mirror of https://github.com/docker/docs.git
fix typos.
Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
parent
4b2f0fe637
commit
172048942d
|
|
@ -24,7 +24,7 @@ func (c *Container) Refresh() (*Container, error) {
|
|||
// Containers represents a list a containers
|
||||
type Containers []*Container
|
||||
|
||||
// Get returns a container using it's ID or Name
|
||||
// Get returns a container using its ID or Name
|
||||
func (containers Containers) Get(IDOrName string) *Container {
|
||||
// Abort immediately if the name is empty.
|
||||
if len(IDOrName) == 0 {
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ func (e *Engine) Status() string {
|
|||
return stateText[e.state]
|
||||
}
|
||||
|
||||
// incFailureCount increases engine's failure count, and set engine as unhealthy if threshold is crossed
|
||||
// incFailureCount increases engine's failure count, and sets engine as unhealthy if threshold is crossed
|
||||
func (e *Engine) incFailureCount() {
|
||||
e.Lock()
|
||||
defer e.Unlock()
|
||||
|
|
@ -713,7 +713,7 @@ func (e *Engine) refreshLoop() {
|
|||
|
||||
err = e.RefreshContainers(false)
|
||||
if err == nil {
|
||||
// Do not check error as older daemon don't support this call
|
||||
// Do not check error as older daemon doesn't support this call
|
||||
e.RefreshVolumes()
|
||||
e.RefreshNetworks()
|
||||
e.RefreshImages()
|
||||
|
|
@ -1052,7 +1052,7 @@ func (e *Engine) AddContainer(container *Container) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Inject an image into the internal state.
|
||||
// addImage injects an image into the internal state.
|
||||
func (e *Engine) addImage(image *Image) {
|
||||
e.Lock()
|
||||
defer e.Unlock()
|
||||
|
|
@ -1060,7 +1060,7 @@ func (e *Engine) addImage(image *Image) {
|
|||
e.images = append(e.images, image)
|
||||
}
|
||||
|
||||
// Remove a container from the internal test.
|
||||
// removeContainer removes a container from the internal state.
|
||||
func (e *Engine) removeContainer(container *Container) error {
|
||||
e.Lock()
|
||||
defer e.Unlock()
|
||||
|
|
@ -1072,7 +1072,7 @@ func (e *Engine) removeContainer(container *Container) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Wipes the internal container state.
|
||||
// cleanupContainers wipes the internal container state.
|
||||
func (e *Engine) cleanupContainers() {
|
||||
e.Lock()
|
||||
e.containers = make(map[string]*Container)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (image *Image) Match(IDOrName string, matchTag bool) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// ImageFilterOptions are the set of filtering options supported by
|
||||
// ImageFilterOptions is the set of filtering options supported by
|
||||
// Images.Filter()
|
||||
type ImageFilterOptions struct {
|
||||
All bool
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ func (c *Cluster) LaunchTask(t *task.Task) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// build the offer from it's internal config and set the agentID
|
||||
// build the offer from its internal config and set the agentID
|
||||
|
||||
c.Lock()
|
||||
// TODO: Only use the offer we need
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ func (networks Networks) Filter(names []string, ids []string, types []string) Ne
|
|||
return out
|
||||
}
|
||||
|
||||
// Get returns a network using it's ID or Name
|
||||
// Get returns a network using its ID or Name
|
||||
func (networks Networks) Get(IDOrName string) *Network {
|
||||
// Abort immediately if the name is empty.
|
||||
if len(IDOrName) == 0 {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ type Volume struct {
|
|||
// Volumes represents an array of volumes
|
||||
type Volumes []*Volume
|
||||
|
||||
// Get returns a volume using it's ID or Name
|
||||
// Get returns a volume using its ID or Name
|
||||
func (volumes Volumes) Get(name string) *Volume {
|
||||
// Abort immediately if the name is empty.
|
||||
if len(name) == 0 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue