From 6d88405cc6fd5d759d2cfe52eb81fdf12f7c65dd Mon Sep 17 00:00:00 2001 From: Yang Li Date: Tue, 29 May 2018 15:40:34 +0800 Subject: [PATCH] typo: fix misspells in code and comments --- extra/libnetwork/bitseq/sequence.go | 2 +- extra/libnetwork/controller.go | 4 ++-- extra/libnetwork/discoverapi/discoverapi.go | 2 +- extra/libnetwork/drivers/bridge/bridge.go | 4 ++-- extra/libnetwork/drivers/bridge/setup_ip_tables.go | 2 +- extra/libnetwork/drivers/bridge/setup_ipv4.go | 4 ++-- extra/libnetwork/drivers/overlay/overlay.go | 2 +- extra/libnetwork/ipvs/ipvs.go | 2 +- extra/libnetwork/networkdb/networkdb.go | 10 +++++----- vendor/github.com/containerd/containerd/process.go | 2 +- vendor/github.com/prometheus/common/expfmt/decode.go | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/extra/libnetwork/bitseq/sequence.go b/extra/libnetwork/bitseq/sequence.go index 550bcbb82..5d38b570f 100644 --- a/extra/libnetwork/bitseq/sequence.go +++ b/extra/libnetwork/bitseq/sequence.go @@ -1,5 +1,5 @@ // Package bitseq provides a structure and utilities for representing long bitmask -// as sequence of run-lenght encoded blocks. It operates direclty on the encoded +// as sequence of run-length encoded blocks. It operates directly on the encoded // representation, it does not decode/encode. package bitseq diff --git a/extra/libnetwork/controller.go b/extra/libnetwork/controller.go index d0c9d9e6b..949eec337 100644 --- a/extra/libnetwork/controller.go +++ b/extra/libnetwork/controller.go @@ -307,7 +307,7 @@ func (c *controller) clusterAgentInit() { c.clusterConfigAvailable = true keys := c.keys c.Unlock() - // agent initialization needs encyrption keys and bind/remote IP which + // agent initialization needs encryption keys and bind/remote IP which // comes from the daemon cluster events if len(keys) > 0 { c.agentSetup() @@ -784,7 +784,7 @@ func (c *controller) reservePools() { } for _, ep := range epl { if err := ep.assignAddress(ipam, true, ep.Iface().AddressIPv6() != nil); err != nil { - log.Warnf("Failed to reserve current adress for endpoint %q (%s) on network %q (%s)", + log.Warnf("Failed to reserve current address for endpoint %q (%s) on network %q (%s)", ep.Name(), ep.ID(), n.Name(), n.ID()) } } diff --git a/extra/libnetwork/discoverapi/discoverapi.go b/extra/libnetwork/discoverapi/discoverapi.go index 3710ea447..aa8a05821 100644 --- a/extra/libnetwork/discoverapi/discoverapi.go +++ b/extra/libnetwork/discoverapi/discoverapi.go @@ -1,6 +1,6 @@ package discoverapi -// Discover is an interface to be implemented by the componenet interested in receiving discover events +// Discover is an interface to be implemented by the components interested in receiving discover events // like new node joining the cluster or datastore updates type Discover interface { // DiscoverNew is a notification for a new discovery event, Example:a new node joining a cluster diff --git a/extra/libnetwork/drivers/bridge/bridge.go b/extra/libnetwork/drivers/bridge/bridge.go index 5370b78e1..dcd9b2dc6 100644 --- a/extra/libnetwork/drivers/bridge/bridge.go +++ b/extra/libnetwork/drivers/bridge/bridge.go @@ -699,8 +699,8 @@ func (d *driver) createNetwork(config *networkConfiguration) error { // Enable IPv6 Forwarding {enableIPv6Forwarding, setupIPv6Forwarding}, - // Setup Loopback Adresses Routing - {!d.config.EnableUserlandProxy, setupLoopbackAdressesRouting}, + // Setup Loopback Addresses Routing + {!d.config.EnableUserlandProxy, setupLoopbackAddressesRouting}, // Setup IPTables. {d.config.EnableIPTables, network.setupIPTables}, diff --git a/extra/libnetwork/drivers/bridge/setup_ip_tables.go b/extra/libnetwork/drivers/bridge/setup_ip_tables.go index 862d9e449..9df4cdc6c 100644 --- a/extra/libnetwork/drivers/bridge/setup_ip_tables.go +++ b/extra/libnetwork/drivers/bridge/setup_ip_tables.go @@ -71,7 +71,7 @@ func (n *bridgeNetwork) setupIPTables(config *networkConfiguration, i *bridgeInt return fmt.Errorf("Cannot program chains, EnableIPTable is disabled") } - // Pickup this configuraton option from driver + // Pickup this configuration option from driver hairpinMode := !driverConfig.EnableUserlandProxy maskedAddrv4 := &net.IPNet{ diff --git a/extra/libnetwork/drivers/bridge/setup_ipv4.go b/extra/libnetwork/drivers/bridge/setup_ipv4.go index f11adc2cb..4fc5b1646 100644 --- a/extra/libnetwork/drivers/bridge/setup_ipv4.go +++ b/extra/libnetwork/drivers/bridge/setup_ipv4.go @@ -46,13 +46,13 @@ func setupGatewayIPv4(config *networkConfiguration, i *bridgeInterface) error { return nil } -func setupLoopbackAdressesRouting(config *networkConfiguration, i *bridgeInterface) error { +func setupLoopbackAddressesRouting(config *networkConfiguration, i *bridgeInterface) error { sysPath := filepath.Join("/proc/sys/net/ipv4/conf", config.BridgeName, "route_localnet") ipv4LoRoutingData, err := ioutil.ReadFile(sysPath) if err != nil { return fmt.Errorf("Cannot read IPv4 local routing setup: %v", err) } - // Enable loopback adresses routing only if it isn't already enabled + // Enable loopback addresses routing only if it isn't already enabled if ipv4LoRoutingData[0] != '1' { if err := ioutil.WriteFile(sysPath, []byte{'1', '\n'}, 0644); err != nil { return fmt.Errorf("Unable to enable local routing for hairpin mode: %v", err) diff --git a/extra/libnetwork/drivers/overlay/overlay.go b/extra/libnetwork/drivers/overlay/overlay.go index 492f7f425..f144c6e8c 100644 --- a/extra/libnetwork/drivers/overlay/overlay.go +++ b/extra/libnetwork/drivers/overlay/overlay.go @@ -99,7 +99,7 @@ func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { // outside of the restore path can potentially fix the network join and succeed. for nid, n := range d.networks { if n.initErr != nil { - logrus.Infof("resetting init error and once variable for network %s after unsuccesful endpoint restore: %v", nid, n.initErr) + logrus.Infof("resetting init error and once variable for network %s after unsuccessful endpoint restore: %v", nid, n.initErr) n.initErr = nil n.once = &sync.Once{} } diff --git a/extra/libnetwork/ipvs/ipvs.go b/extra/libnetwork/ipvs/ipvs.go index d98acd405..9b44159d5 100644 --- a/extra/libnetwork/ipvs/ipvs.go +++ b/extra/libnetwork/ipvs/ipvs.go @@ -47,7 +47,7 @@ type Handle struct { // New provides a new ipvs handle in the namespace pointed to by the // passed path. It will return a valid handle or an error in case an -// error occured while creating the handle. +// error occurred while creating the handle. func New(path string) (*Handle, error) { setup() diff --git a/extra/libnetwork/networkdb/networkdb.go b/extra/libnetwork/networkdb/networkdb.go index 816a07ce7..ae0fd65a4 100644 --- a/extra/libnetwork/networkdb/networkdb.go +++ b/extra/libnetwork/networkdb/networkdb.go @@ -221,7 +221,7 @@ func (nDB *NetworkDB) getEntry(tname, nid, key string) (*entry, error) { // CreateEntry creates a table entry in NetworkDB for given (network, // table, key) tuple and if the NetworkDB is part of the cluster -// propogates this event to the cluster. It is an error to create an +// propagates this event to the cluster. It is an error to create an // entry for the same tuple for which there is already an existing // entry. func (nDB *NetworkDB) CreateEntry(tname, nid, key string, value []byte) error { @@ -250,7 +250,7 @@ func (nDB *NetworkDB) CreateEntry(tname, nid, key string, value []byte) error { // UpdateEntry updates a table entry in NetworkDB for given (network, // table, key) tuple and if the NetworkDB is part of the cluster -// propogates this event to the cluster. It is an error to update a +// propagates this event to the cluster. It is an error to update a // non-existent entry. func (nDB *NetworkDB) UpdateEntry(tname, nid, key string, value []byte) error { if _, err := nDB.GetEntry(tname, nid, key); err != nil { @@ -278,7 +278,7 @@ func (nDB *NetworkDB) UpdateEntry(tname, nid, key string, value []byte) error { // DeleteEntry deletes a table entry in NetworkDB for given (network, // table, key) tuple and if the NetworkDB is part of the cluster -// propogates this event to the cluster. +// propagates this event to the cluster. func (nDB *NetworkDB) DeleteEntry(tname, nid, key string) error { value, err := nDB.GetEntry(tname, nid, key) if err != nil { @@ -379,7 +379,7 @@ func (nDB *NetworkDB) WalkTable(tname string, fn func(string, string, []byte) bo return nil } -// JoinNetwork joins this node to a given network and propogates this +// JoinNetwork joins this node to a given network and propagates this // event across the cluster. This triggers this node joining the // sub-cluster of this network and participates in the network-scoped // gossip and bulk sync for this network. @@ -418,7 +418,7 @@ func (nDB *NetworkDB) JoinNetwork(nid string) error { return nil } -// LeaveNetwork leaves this node from a given network and propogates +// LeaveNetwork leaves this node from a given network and propagates // this event across the cluster. This triggers this node leaving the // sub-cluster of this network and as a result will no longer // participate in the network-scoped gossip and bulk sync for this diff --git a/vendor/github.com/containerd/containerd/process.go b/vendor/github.com/containerd/containerd/process.go index ad1a2a1f4..ce5d83a91 100644 --- a/vendor/github.com/containerd/containerd/process.go +++ b/vendor/github.com/containerd/containerd/process.go @@ -63,7 +63,7 @@ func (s ExitStatus) ExitTime() time.Time { return s.exitedAt } -// Error returns the error, if any, that occured while waiting for the +// Error returns the error, if any, that occurred while waiting for the // process. func (s ExitStatus) Error() error { return s.err diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index a7a42d5ef..7657f841d 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -166,7 +166,7 @@ func (sd *SampleDecoder) Decode(s *model.Vector) error { // ExtractSamples builds a slice of samples from the provided metric // families. If an error occurs during sample extraction, it continues to // extract from the remaining metric families. The returned error is the last -// error that has occured. +// error that has occurred. func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) { var ( all model.Vector