diff --git a/libnetwork/datastore/datastore.go b/libnetwork/datastore/datastore.go index 687473d275..c15cd620c1 100644 --- a/libnetwork/datastore/datastore.go +++ b/libnetwork/datastore/datastore.go @@ -31,7 +31,7 @@ type DataStore interface { DeleteObjectAtomic(kvObject KVObject) error // DeleteTree deletes a record DeleteTree(kvObject KVObject) error - // Watchable returns whether the store is watchable are not + // Watchable returns whether the store is watchable or not Watchable() bool // Watch for changes on a KVObject Watch(kvObject KVObject, stopCh <-chan struct{}) (<-chan KVObject, error) diff --git a/libnetwork/discoverapi/discoverapi.go b/libnetwork/discoverapi/discoverapi.go index 03e9e909cf..eeacc3204e 100644 --- a/libnetwork/discoverapi/discoverapi.go +++ b/libnetwork/discoverapi/discoverapi.go @@ -16,7 +16,7 @@ type DiscoveryType int const ( // NodeDiscovery represents Node join/leave events provided by discovery NodeDiscovery = iota + 1 - // DatastoreConfig represents a add/remove datastore event + // DatastoreConfig represents an add/remove datastore event DatastoreConfig ) diff --git a/libnetwork/driverapi/driverapi.go b/libnetwork/driverapi/driverapi.go index 884e23e914..4dd58aad12 100644 --- a/libnetwork/driverapi/driverapi.go +++ b/libnetwork/driverapi/driverapi.go @@ -88,7 +88,7 @@ type JoinInfo interface { // SetGatewayIPv6 sets the default IPv6 gateway when a container joins the endpoint. SetGatewayIPv6(net.IP) error - // AddStaticRoute adds a routes to the sandbox. + // AddStaticRoute adds a route to the sandbox. // It may be used in addtion to or instead of a default gateway (as above). AddStaticRoute(destination *net.IPNet, routeType int, nextHop net.IP) error diff --git a/libnetwork/driverapi/ipamdata.go b/libnetwork/driverapi/ipamdata.go index 9a2375bf8a..fc1c2af441 100644 --- a/libnetwork/driverapi/ipamdata.go +++ b/libnetwork/driverapi/ipamdata.go @@ -64,7 +64,7 @@ func (i *IPAMData) UnmarshalJSON(data []byte) error { return nil } -// Validate checks wheter the IPAMData structure contains congruent data +// Validate checks whether the IPAMData structure contains congruent data func (i *IPAMData) Validate() error { var isV6 bool if i.Pool == nil { @@ -93,7 +93,7 @@ func (i *IPAMData) Validate() error { return nil } -// IsV6 returns wheter this is an IPv6 IPAMData structure +// IsV6 returns whether this is an IPv6 IPAMData structure func (i *IPAMData) IsV6() bool { return nil == i.Pool.IP.To4() } diff --git a/libnetwork/idm/idm.go b/libnetwork/idm/idm.go index 37ae79e558..3ed820ca91 100644 --- a/libnetwork/idm/idm.go +++ b/libnetwork/idm/idm.go @@ -8,7 +8,7 @@ import ( "github.com/docker/libnetwork/datastore" ) -// Idm manages the reservation/release of numerical ids from a contiguos set +// Idm manages the reservation/release of numerical ids from a contiguous set type Idm struct { start uint64 end uint64 diff --git a/libnetwork/ipam/structures.go b/libnetwork/ipam/structures.go index 601eda4fba..09a77695dd 100644 --- a/libnetwork/ipam/structures.go +++ b/libnetwork/ipam/structures.go @@ -40,7 +40,7 @@ type addrSpace struct { } // AddressRange specifies first and last ip ordinal which -// identify a range in a a pool of addresses +// identifies a range in a pool of addresses type AddressRange struct { Sub *net.IPNet Start, End uint64 @@ -85,7 +85,7 @@ func (s *SubnetKey) String() string { return k } -// FromString populate the SubnetKey object reading it from string +// FromString populates the SubnetKey object reading it from string func (s *SubnetKey) FromString(str string) error { if str == "" || !strings.Contains(str, "/") { return types.BadRequestErrorf("invalid string form for subnetkey: %s", str) diff --git a/libnetwork/ipam/utils.go b/libnetwork/ipam/utils.go index d524b47830..5117c55cc7 100644 --- a/libnetwork/ipam/utils.go +++ b/libnetwork/ipam/utils.go @@ -62,7 +62,7 @@ func getAddressVersion(ip net.IP) ipVersion { } // Adds the ordinal IP to the current array -// 192.168.0.0 + 53 => 192.168.53 +// 192.168.0.0 + 53 => 192.168.0.53 func addIntToIP(array []byte, ordinal uint64) { for i := len(array) - 1; i >= 0; i-- { array[i] |= (byte)(ordinal & 0xff) diff --git a/libnetwork/ipamapi/contract.go b/libnetwork/ipamapi/contract.go index ae6ecc8990..eda461120e 100644 --- a/libnetwork/ipamapi/contract.go +++ b/libnetwork/ipamapi/contract.go @@ -33,7 +33,7 @@ type Callback interface { * IPAM Errors **************/ -// Weel-known errors returned by IPAM +// Well-known errors returned by IPAM var ( ErrIpamInternalError = types.InternalErrorf("IPAM Internal Error") ErrInvalidAddressSpace = types.BadRequestErrorf("Invalid Address Space") diff --git a/libnetwork/types/types.go b/libnetwork/types/types.go index 7ada9643c0..44ee563e69 100644 --- a/libnetwork/types/types.go +++ b/libnetwork/types/types.go @@ -389,7 +389,7 @@ const ( // NEXTHOP indicates a StaticRoute with an IP next hop. NEXTHOP = iota - // CONNECTED indicates a StaticRoute with a interface for directly connected peers. + // CONNECTED indicates a StaticRoute with an interface for directly connected peers. CONNECTED ) @@ -458,25 +458,25 @@ type NotFoundError interface { NotFound() } -// ForbiddenError is an interface for errors which denote an valid request that cannot be honored +// ForbiddenError is an interface for errors which denote a valid request that cannot be honored type ForbiddenError interface { // Forbidden makes implementer into ForbiddenError type Forbidden() } -// NoServiceError is an interface for errors returned when the required service is not available +// NoServiceError is an interface for errors returned when the required service is not available type NoServiceError interface { // NoService makes implementer into NoServiceError type NoService() } -// TimeoutError is an interface for errors raised because of timeout +// TimeoutError is an interface for errors raised because of timeout type TimeoutError interface { // Timeout makes implementer into TimeoutError type Timeout() } -// NotImplementedError is an interface for errors raised because of requested functionality is not yet implemented +// NotImplementedError is an interface for errors raised because of requested functionality is not yet implemented type NotImplementedError interface { // NotImplemented makes implementer into NotImplementedError type NotImplemented()