diff --git a/libnetwork/drivers/bridge/error.go b/libnetwork/drivers/bridge/error.go index b247eec593..ee28cd2aa5 100644 --- a/libnetwork/drivers/bridge/error.go +++ b/libnetwork/drivers/bridge/error.go @@ -19,7 +19,7 @@ var ( // ErrIfaceName error is returned when a new name could not be generated. ErrIfaceName = errors.New("Failed to find name for new interface") - // ErrNoIPAddr error is returned when bridge has no IPv4 addrss configured. + // ErrNoIPAddr error is returned when bridge has no IPv4 address configured. ErrNoIPAddr = errors.New("Bridge has no IPv4 address configured") ) diff --git a/libnetwork/drivers/bridge/setup_ipv4.go b/libnetwork/drivers/bridge/setup_ipv4.go index 20036f2ee3..20c0427749 100644 --- a/libnetwork/drivers/bridge/setup_ipv4.go +++ b/libnetwork/drivers/bridge/setup_ipv4.go @@ -70,7 +70,7 @@ func electBridgeIPv4(config *Configuration) (*net.IPNet, error) { nameservers = append(nameservers, getNameserversAsCIDR(resolvConf)...) } - // Try to automatically elect appropriate brige IPv4 settings. + // Try to automatically elect appropriate bridge IPv4 settings. for _, n := range bridgeNetworks { if err := netutils.CheckNameserverOverlaps(nameservers, n); err == nil { if err := netutils.CheckRouteOverlaps(n); err == nil { diff --git a/libnetwork/pkg/portallocator/portallocator.go b/libnetwork/pkg/portallocator/portallocator.go index df605d7fb8..422284e947 100644 --- a/libnetwork/pkg/portallocator/portallocator.go +++ b/libnetwork/pkg/portallocator/portallocator.go @@ -122,7 +122,7 @@ func getDynamicPortRange() (start int, end int, err error) { } // RequestPort requests new port from global ports pool for specified ip and proto. -// If port is 0 it returns first free port. Otherwise it cheks port availability +// If port is 0 it returns first free port. Otherwise it checks port availability // in pool and return that port or error if port is already busy. func (p *PortAllocator) RequestPort(ip net.IP, proto string, port int) (int, error) { p.mutex.Lock() diff --git a/libnetwork/portmapper/mapper.go b/libnetwork/portmapper/mapper.go index 3661b5e462..fdedd27d06 100644 --- a/libnetwork/portmapper/mapper.go +++ b/libnetwork/portmapper/mapper.go @@ -25,7 +25,7 @@ var ( ErrUnknownBackendAddressType = errors.New("unknown container address type not supported") // ErrPortMappedForIP refers to a port already mapped to an ip address ErrPortMappedForIP = errors.New("port is already mapped to ip") - // ErrPortNotMapped refers to an unampped port + // ErrPortNotMapped refers to an unmapped port ErrPortNotMapped = errors.New("port is not mapped") ) @@ -45,7 +45,7 @@ func New() *PortMapper { return NewWithPortAllocator(portallocator.New()) } -// NewWithPortAllocator returns a new instance of PortMapper wich will use the specified PortAllocator +// NewWithPortAllocator returns a new instance of PortMapper which will use the specified PortAllocator func NewWithPortAllocator(allocator *portallocator.PortAllocator) *PortMapper { return &PortMapper{ currentMappings: make(map[string]*mapping),