Skip to content

Commit 1a8def6

Browse files
committed
Merge pull request #978 from allencloud/fix-typos
Fix some typos
2 parents 90c5517 + 02e7d98 commit 1a8def6

9 files changed

Lines changed: 15 additions & 15 deletions

File tree

datastore/datastore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type DataStore interface {
3131
DeleteObjectAtomic(kvObject KVObject) error
3232
// DeleteTree deletes a record
3333
DeleteTree(kvObject KVObject) error
34-
// Watchable returns whether the store is watchable are not
34+
// Watchable returns whether the store is watchable or not
3535
Watchable() bool
3636
// Watch for changes on a KVObject
3737
Watch(kvObject KVObject, stopCh <-chan struct{}) (<-chan KVObject, error)

discoverapi/discoverapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type DiscoveryType int
1616
const (
1717
// NodeDiscovery represents Node join/leave events provided by discovery
1818
NodeDiscovery = iota + 1
19-
// DatastoreConfig represents a add/remove datastore event
19+
// DatastoreConfig represents an add/remove datastore event
2020
DatastoreConfig
2121
)
2222

driverapi/driverapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type JoinInfo interface {
8888
// SetGatewayIPv6 sets the default IPv6 gateway when a container joins the endpoint.
8989
SetGatewayIPv6(net.IP) error
9090

91-
// AddStaticRoute adds a routes to the sandbox.
91+
// AddStaticRoute adds a route to the sandbox.
9292
// It may be used in addtion to or instead of a default gateway (as above).
9393
AddStaticRoute(destination *net.IPNet, routeType int, nextHop net.IP) error
9494

driverapi/ipamdata.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (i *IPAMData) UnmarshalJSON(data []byte) error {
6464
return nil
6565
}
6666

67-
// Validate checks wheter the IPAMData structure contains congruent data
67+
// Validate checks whether the IPAMData structure contains congruent data
6868
func (i *IPAMData) Validate() error {
6969
var isV6 bool
7070
if i.Pool == nil {
@@ -93,7 +93,7 @@ func (i *IPAMData) Validate() error {
9393
return nil
9494
}
9595

96-
// IsV6 returns wheter this is an IPv6 IPAMData structure
96+
// IsV6 returns whether this is an IPv6 IPAMData structure
9797
func (i *IPAMData) IsV6() bool {
9898
return nil == i.Pool.IP.To4()
9999
}

idm/idm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/docker/libnetwork/datastore"
99
)
1010

11-
// Idm manages the reservation/release of numerical ids from a contiguos set
11+
// Idm manages the reservation/release of numerical ids from a contiguous set
1212
type Idm struct {
1313
start uint64
1414
end uint64

ipam/structures.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type addrSpace struct {
4040
}
4141

4242
// AddressRange specifies first and last ip ordinal which
43-
// identify a range in a a pool of addresses
43+
// identifies a range in a pool of addresses
4444
type AddressRange struct {
4545
Sub *net.IPNet
4646
Start, End uint64
@@ -85,7 +85,7 @@ func (s *SubnetKey) String() string {
8585
return k
8686
}
8787

88-
// FromString populate the SubnetKey object reading it from string
88+
// FromString populates the SubnetKey object reading it from string
8989
func (s *SubnetKey) FromString(str string) error {
9090
if str == "" || !strings.Contains(str, "/") {
9191
return types.BadRequestErrorf("invalid string form for subnetkey: %s", str)

ipam/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func getAddressVersion(ip net.IP) ipVersion {
6262
}
6363

6464
// Adds the ordinal IP to the current array
65-
// 192.168.0.0 + 53 => 192.168.53
65+
// 192.168.0.0 + 53 => 192.168.0.53
6666
func addIntToIP(array []byte, ordinal uint64) {
6767
for i := len(array) - 1; i >= 0; i-- {
6868
array[i] |= (byte)(ordinal & 0xff)

ipamapi/contract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Callback interface {
3333
* IPAM Errors
3434
**************/
3535

36-
// Weel-known errors returned by IPAM
36+
// Well-known errors returned by IPAM
3737
var (
3838
ErrIpamInternalError = types.InternalErrorf("IPAM Internal Error")
3939
ErrInvalidAddressSpace = types.BadRequestErrorf("Invalid Address Space")

types/types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ const (
389389
// NEXTHOP indicates a StaticRoute with an IP next hop.
390390
NEXTHOP = iota
391391

392-
// CONNECTED indicates a StaticRoute with a interface for directly connected peers.
392+
// CONNECTED indicates a StaticRoute with an interface for directly connected peers.
393393
CONNECTED
394394
)
395395

@@ -458,25 +458,25 @@ type NotFoundError interface {
458458
NotFound()
459459
}
460460

461-
// ForbiddenError is an interface for errors which denote an valid request that cannot be honored
461+
// ForbiddenError is an interface for errors which denote a valid request that cannot be honored
462462
type ForbiddenError interface {
463463
// Forbidden makes implementer into ForbiddenError type
464464
Forbidden()
465465
}
466466

467-
// NoServiceError is an interface for errors returned when the required service is not available
467+
// NoServiceError is an interface for errors returned when the required service is not available
468468
type NoServiceError interface {
469469
// NoService makes implementer into NoServiceError type
470470
NoService()
471471
}
472472

473-
// TimeoutError is an interface for errors raised because of timeout
473+
// TimeoutError is an interface for errors raised because of timeout
474474
type TimeoutError interface {
475475
// Timeout makes implementer into TimeoutError type
476476
Timeout()
477477
}
478478

479-
// NotImplementedError is an interface for errors raised because of requested functionality is not yet implemented
479+
// NotImplementedError is an interface for errors raised because of requested functionality is not yet implemented
480480
type NotImplementedError interface {
481481
// NotImplemented makes implementer into NotImplementedError type
482482
NotImplemented()

0 commit comments

Comments
 (0)