From d69747e19e862dc302694f4d02b5a29c14aa5b78 Mon Sep 17 00:00:00 2001 From: allencloud Date: Sat, 30 Jul 2016 02:21:10 +0800 Subject: [PATCH] fix typo in comments and log Signed-off-by: allencloud --- libnetwork/controller.go | 2 +- libnetwork/default_gateway.go | 4 ++-- libnetwork/drivers/bridge/bridge.go | 2 +- libnetwork/network.go | 2 +- libnetwork/service_linux.go | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libnetwork/controller.go b/libnetwork/controller.go index e79d010614..912f7da941 100644 --- a/libnetwork/controller.go +++ b/libnetwork/controller.go @@ -97,7 +97,7 @@ type NetworkController interface { // Sandboxes returns the list of Sandbox(s) managed by this controller. Sandboxes() []Sandbox - // WlakSandboxes uses the provided function to walk the Sandbox(s) managed by this controller. + // WalkSandboxes uses the provided function to walk the Sandbox(s) managed by this controller. WalkSandboxes(walker SandboxWalker) // SandboxByID returns the Sandbox which has the passed id. If not found, a types.NotFoundError is returned. diff --git a/libnetwork/default_gateway.go b/libnetwork/default_gateway.go index 31cf86d1d4..2f2e284ff1 100644 --- a/libnetwork/default_gateway.go +++ b/libnetwork/default_gateway.go @@ -14,7 +14,7 @@ const ( var procGwNetwork = make(chan (bool), 1) /* - libnetwork creates a bridge network "docker_gw_bridge" for provding + libnetwork creates a bridge network "docker_gw_bridge" for providing default gateway for the containers if none of the container's endpoints have GW set by the driver. ICC is set to false for the GW_bridge network. @@ -29,7 +29,7 @@ var procGwNetwork = make(chan (bool), 1) func (sb *sandbox) setupDefaultGW() error { - // check if the conitainer already has a GW endpoint + // check if the container already has a GW endpoint if ep := sb.getEndpointInGWNetwork(); ep != nil { return nil } diff --git a/libnetwork/drivers/bridge/bridge.go b/libnetwork/drivers/bridge/bridge.go index d2b1d24829..8410eb037a 100644 --- a/libnetwork/drivers/bridge/bridge.go +++ b/libnetwork/drivers/bridge/bridge.go @@ -564,7 +564,7 @@ func (d *driver) CreateNetwork(id string, option map[string]interface{}, nInfo d } d.Unlock() - // Parse and validate the config. It should not conflict with existing networks' config + // Parse and validate the config. It should not be conflict with existing networks' config config, err := parseNetworkOptions(id, option) if err != nil { return err diff --git a/libnetwork/network.go b/libnetwork/network.go index 71cbced580..80641de0a0 100644 --- a/libnetwork/network.go +++ b/libnetwork/network.go @@ -1206,7 +1206,7 @@ func (n *network) requestPoolHelper(ipam ipamapi.Ipam, addressSpace, preferredPo }() // If this is a preferred pool request and the network - // is local scope and there is a overlap, we fail the + // is local scope and there is an overlap, we fail the // network creation right here. The pool will be // released in the defer. if preferredPool != "" { diff --git a/libnetwork/service_linux.go b/libnetwork/service_linux.go index fc8e4fcbe6..d2fbc2b069 100644 --- a/libnetwork/service_linux.go +++ b/libnetwork/service_linux.go @@ -316,7 +316,7 @@ func (sb *sandbox) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*P i, err := ipvs.New(sb.Key()) if err != nil { - logrus.Errorf("Failed to create a ipvs handle for sbox %s: %v", sb.Key(), err) + logrus.Errorf("Failed to create an ipvs handle for sbox %s: %v", sb.Key(), err) return } defer i.Close() @@ -371,7 +371,7 @@ func (sb *sandbox) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*Po i, err := ipvs.New(sb.Key()) if err != nil { - logrus.Errorf("Failed to create a ipvs handle for sbox %s: %v", sb.Key(), err) + logrus.Errorf("Failed to create an ipvs handle for sbox %s: %v", sb.Key(), err) return } defer i.Close()