Fix some typos.

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-02-29 00:34:30 +08:00
parent 9994ce15f5
commit 02e7d98f63
9 changed files with 15 additions and 15 deletions

View File

@ -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)

View File

@ -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
)

View File

@ -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

View File

@ -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()
}

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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")

View File

@ -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()