1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix nits in comments

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-12-23 20:48:25 +08:00
parent 592f9891d4
commit 6fb05778ba
10 changed files with 12 additions and 12 deletions

View file

@ -84,7 +84,7 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
}
if err != nil {
// if there is a `-` then its an RFC3339 like timestamp otherwise assume unixtimestamp
// if there is a `-` then it's an RFC3339 like timestamp otherwise assume unixtimestamp
if strings.Contains(value, "-") {
return "", err // was probably an RFC3339 like timestamp but the parser failed with an error
}

View file

@ -188,7 +188,7 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowLocalD
comment := fmt.Sprintf("%s %s in %s", cmdName, origPaths, dest)
// Twiddle the destination when its a relative path - meaning, make it
// Twiddle the destination when it's a relative path - meaning, make it
// relative to the WORKINGDIR
if dest, err = normaliseDest(cmdName, b.runConfig.WorkingDir, dest); err != nil {
return err
@ -384,11 +384,11 @@ func (b *Builder) processImageFrom(img builder.Image) error {
}
// Check to see if we have a default PATH, note that windows won't
// have one as its set by HCS
// have one as it's set by HCS
if system.DefaultPathEnv != "" {
// Convert the slice of strings that represent the current list
// of env vars into a map so we can see if PATH is already set.
// If its not set then go ahead and give it our default value
// If it's not set then go ahead and give it our default value
configEnv := opts.ConvertKVStringsToMap(b.runConfig.Env)
if _, ok := configEnv["PATH"]; !ok {
b.runConfig.Env = append(b.runConfig.Env,

View file

@ -37,7 +37,7 @@ func runUnlock(dockerCli *command.DockerCli, opts unlockOptions) error {
client := dockerCli.Client()
ctx := context.Background()
// First see if the node is actually part of a swarm, and if it's is actually locked first.
// First see if the node is actually part of a swarm, and if it is actually locked first.
// If it's in any other state than locked, don't ask for the key.
info, err := client.Info(ctx)
if err != nil {

View file

@ -239,7 +239,7 @@ func parseClusterAdvertiseSettings(clusterStore, clusterAdvertise string) (strin
return advertise, nil
}
// GetConflictFreeLabels validate Labels for conflict
// GetConflictFreeLabels validates Labels for conflict
// In swarm the duplicates for labels are removed
// so we only take same values here, no conflict values
// If the key-value is the same we will only take the last label

View file

@ -640,7 +640,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
logrus.Infof("Graph migration to content-addressability took %.2f seconds", time.Since(migrationStart).Seconds())
// Discovery is only enabled when the daemon is launched with an address to advertise. When
// initialized, the daemon is registered and we can store the discovery backend as its read-only
// initialized, the daemon is registered and we can store the discovery backend as it's read-only
if err := d.initDiscovery(config); err != nil {
return nil, err
}

View file

@ -301,7 +301,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
return warnings, nil
}
// platformReload update configuration with platform specific options
// platformReload updates configuration with platform specific options
func (daemon *Daemon) platformReload(config *Config) map[string]string {
return map[string]string{}
}

View file

@ -556,7 +556,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
return warnings, nil
}
// platformReload update configuration with platform specific options
// platformReload updates configuration with platform specific options
func (daemon *Daemon) platformReload(config *Config) map[string]string {
if config.IsValueSet("runtimes") {
daemon.configStore.Runtimes = config.Runtimes

View file

@ -203,7 +203,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
return warnings, err
}
// platformReload update configuration with platform specific options
// platformReload updates configuration with platform specific options
func (daemon *Daemon) platformReload(config *Config) map[string]string {
return map[string]string{}
}

View file

@ -119,7 +119,7 @@ func (daemon *Daemon) Kill(container *container.Container) error {
if err := daemon.killPossiblyDeadProcess(container, int(syscall.SIGKILL)); err != nil {
// While normally we might "return err" here we're not going to
// because if we can't stop the container by this point then
// its probably because its already stopped. Meaning, between
// it's probably because it's already stopped. Meaning, between
// the time of the IsRunning() call above and now it stopped.
// Also, since the err return will be environment specific we can't
// look for any particular (common) error that would indicate

View file

@ -52,7 +52,7 @@ func (daemon *Daemon) containerStop(container *container.Container, seconds int)
if err := daemon.killPossiblyDeadProcess(container, stopSignal); err != nil {
// While normally we might "return err" here we're not going to
// because if we can't stop the container by this point then
// its probably because its already stopped. Meaning, between
// it's probably because it's already stopped. Meaning, between
// the time of the IsRunning() call above and now it stopped.
// Also, since the err return will be environment specific we can't
// look for any particular (common) error that would indicate