Pārlūkot izejas kodu

Merge pull request #978 from allencloud/fix-typos

Fix some typos
Madhu Venugopal 9 gadi atpakaļ
vecāks
revīzija
a470279081

+ 1 - 1
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)

+ 1 - 1
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
 )
 

+ 1 - 1
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
 

+ 2 - 2
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()
 }

+ 1 - 1
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

+ 2 - 2
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)

+ 1 - 1
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)

+ 1 - 1
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")

+ 5 - 5
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()