fix typos.

Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
Sun Hongliang 2016-03-14 02:46:43 +08:00
parent 4b2f0fe637
commit 172048942d
6 changed files with 10 additions and 10 deletions

View File

@ -24,7 +24,7 @@ func (c *Container) Refresh() (*Container, error) {
// Containers represents a list a containers // Containers represents a list a containers
type Containers []*Container 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 { func (containers Containers) Get(IDOrName string) *Container {
// Abort immediately if the name is empty. // Abort immediately if the name is empty.
if len(IDOrName) == 0 { if len(IDOrName) == 0 {

View File

@ -346,7 +346,7 @@ func (e *Engine) Status() string {
return stateText[e.state] 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() { func (e *Engine) incFailureCount() {
e.Lock() e.Lock()
defer e.Unlock() defer e.Unlock()
@ -713,7 +713,7 @@ func (e *Engine) refreshLoop() {
err = e.RefreshContainers(false) err = e.RefreshContainers(false)
if err == nil { 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.RefreshVolumes()
e.RefreshNetworks() e.RefreshNetworks()
e.RefreshImages() e.RefreshImages()
@ -1052,7 +1052,7 @@ func (e *Engine) AddContainer(container *Container) error {
return nil return nil
} }
// Inject an image into the internal state. // addImage injects an image into the internal state.
func (e *Engine) addImage(image *Image) { func (e *Engine) addImage(image *Image) {
e.Lock() e.Lock()
defer e.Unlock() defer e.Unlock()
@ -1060,7 +1060,7 @@ func (e *Engine) addImage(image *Image) {
e.images = append(e.images, 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 { func (e *Engine) removeContainer(container *Container) error {
e.Lock() e.Lock()
defer e.Unlock() defer e.Unlock()
@ -1072,7 +1072,7 @@ func (e *Engine) removeContainer(container *Container) error {
return nil return nil
} }
// Wipes the internal container state. // cleanupContainers wipes the internal container state.
func (e *Engine) cleanupContainers() { func (e *Engine) cleanupContainers() {
e.Lock() e.Lock()
e.containers = make(map[string]*Container) e.containers = make(map[string]*Container)

View File

@ -71,7 +71,7 @@ func (image *Image) Match(IDOrName string, matchTag bool) bool {
return false return false
} }
// ImageFilterOptions are the set of filtering options supported by // ImageFilterOptions is the set of filtering options supported by
// Images.Filter() // Images.Filter()
type ImageFilterOptions struct { type ImageFilterOptions struct {
All bool All bool

View File

@ -529,7 +529,7 @@ func (c *Cluster) LaunchTask(t *task.Task) bool {
return true 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() c.Lock()
// TODO: Only use the offer we need // TODO: Only use the offer we need

View File

@ -78,7 +78,7 @@ func (networks Networks) Filter(names []string, ids []string, types []string) Ne
return out 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 { func (networks Networks) Get(IDOrName string) *Network {
// Abort immediately if the name is empty. // Abort immediately if the name is empty.
if len(IDOrName) == 0 { if len(IDOrName) == 0 {

View File

@ -12,7 +12,7 @@ type Volume struct {
// Volumes represents an array of volumes // Volumes represents an array of volumes
type Volumes []*Volume 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 { func (volumes Volumes) Get(name string) *Volume {
// Abort immediately if the name is empty. // Abort immediately if the name is empty.
if len(name) == 0 { if len(name) == 0 {