From 21c5a6281bc824a8b1eea9f8d7adc3c9e35ae0c8 Mon Sep 17 00:00:00 2001 From: bin liu Date: Wed, 22 Jun 2016 14:20:30 +0800 Subject: [PATCH] fix typos Signed-off-by: bin liu --- drivers/macvlan/macvlan_state.go | 2 +- hostdiscovery/hostdiscovery_api.go | 2 +- ipams/remote/api/api.go | 2 +- netutils/utils_linux.go | 4 ++-- osl/interface_linux.go | 2 +- sandbox_dns_unix.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/macvlan/macvlan_state.go b/drivers/macvlan/macvlan_state.go index dd2a60ce4b..8ac3d282f9 100644 --- a/drivers/macvlan/macvlan_state.go +++ b/drivers/macvlan/macvlan_state.go @@ -31,7 +31,7 @@ func (d *driver) deleteNetwork(nid string) { d.Unlock() } -// getNetworks Safely returns a slice of existng networks +// getNetworks Safely returns a slice of existing networks func (d *driver) getNetworks() []*network { d.Lock() defer d.Unlock() diff --git a/hostdiscovery/hostdiscovery_api.go b/hostdiscovery/hostdiscovery_api.go index b9c17250ce..f0ca40e31f 100644 --- a/hostdiscovery/hostdiscovery_api.go +++ b/hostdiscovery/hostdiscovery_api.go @@ -15,7 +15,7 @@ type LeaveCallback func(entries []net.IP) type HostDiscovery interface { //Watch Node join and leave cluster events Watch(activeCallback ActiveCallback, joinCallback JoinCallback, leaveCallback LeaveCallback) error - // StopDiscovery stops the discovery perocess + // StopDiscovery stops the discovery process StopDiscovery() error // Fetch returns a list of host IPs that are currently discovered Fetch() []net.IP diff --git a/ipams/remote/api/api.go b/ipams/remote/api/api.go index 394f2c5b18..23f3eda7d1 100644 --- a/ipams/remote/api/api.go +++ b/ipams/remote/api/api.go @@ -26,7 +26,7 @@ type GetCapabilityResponse struct { RequiresRequestReplay bool } -// ToCapability converts the capability response into the internal ipam driver capaility structure +// ToCapability converts the capability response into the internal ipam driver capability structure func (capRes GetCapabilityResponse) ToCapability() *ipamapi.Capability { return &ipamapi.Capability{ RequiresMACAddress: capRes.RequiresMACAddress, diff --git a/netutils/utils_linux.go b/netutils/utils_linux.go index 7781bc6a09..4a03a3a15a 100644 --- a/netutils/utils_linux.go +++ b/netutils/utils_linux.go @@ -63,7 +63,7 @@ func GenerateIfaceName(nlh *netlink.Handle, prefix string, len int) (string, err // ElectInterfaceAddresses looks for an interface on the OS with the // specified name and returns its IPv4 and IPv6 addresses in CIDR -// form. If the interface does not exist, it chooses from a predifined +// form. If the interface does not exist, it chooses from a predefined // list the first IPv4 address which does not conflict with other // interfaces on the system. func ElectInterfaceAddresses(name string) (*net.IPNet, []*net.IPNet, error) { @@ -94,7 +94,7 @@ func ElectInterfaceAddresses(name string) (*net.IPNet, []*net.IPNet, error) { } if link == nil || v4Net == nil { - // Choose from predifined broad networks + // Choose from predefined broad networks v4Net, err = FindAvailableNetwork(ipamutils.PredefinedBroadNetworks) if err != nil { return nil, nil, err diff --git a/osl/interface_linux.go b/osl/interface_linux.go index 63fcf5561d..c8477df7c8 100644 --- a/osl/interface_linux.go +++ b/osl/interface_linux.go @@ -131,7 +131,7 @@ func (i *nwIface) Remove() error { nlh := n.nlHandle n.Unlock() - // Find the network inteerface identified by the DstName attribute. + // Find the network interface identified by the DstName attribute. iface, err := nlh.LinkByName(i.DstName()) if err != nil { return err diff --git a/sandbox_dns_unix.go b/sandbox_dns_unix.go index 735708563f..a385f3d4c9 100644 --- a/sandbox_dns_unix.go +++ b/sandbox_dns_unix.go @@ -282,7 +282,7 @@ func (sb *sandbox) updateDNS(ipv6Enabled bool) error { } // Embedded DNS server has to be enabled for this sandbox. Rebuild the container's -// resolv.conf by doing the follwing +// resolv.conf by doing the following // - Save the external name servers in resolv.conf in the sandbox // - Add only the embedded server's IP to container's resolv.conf // - If the embedded server needs any resolv.conf options add it to the current list