Signed-off-by: allencloud <allen.sun@daocloud.io>
| ... | ... |
@@ -84,7 +84,7 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
|
| 84 | 84 |
} |
| 85 | 85 |
|
| 86 | 86 |
if err != nil {
|
| 87 |
- // if there is a `-` then its an RFC3339 like timestamp otherwise assume unixtimestamp |
|
| 87 |
+ // if there is a `-` then it's an RFC3339 like timestamp otherwise assume unixtimestamp |
|
| 88 | 88 |
if strings.Contains(value, "-") {
|
| 89 | 89 |
return "", err // was probably an RFC3339 like timestamp but the parser failed with an error |
| 90 | 90 |
} |
| ... | ... |
@@ -188,7 +188,7 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowLocalD |
| 188 | 188 |
|
| 189 | 189 |
comment := fmt.Sprintf("%s %s in %s", cmdName, origPaths, dest)
|
| 190 | 190 |
|
| 191 |
- // Twiddle the destination when its a relative path - meaning, make it |
|
| 191 |
+ // Twiddle the destination when it's a relative path - meaning, make it |
|
| 192 | 192 |
// relative to the WORKINGDIR |
| 193 | 193 |
if dest, err = normaliseDest(cmdName, b.runConfig.WorkingDir, dest); err != nil {
|
| 194 | 194 |
return err |
| ... | ... |
@@ -384,11 +384,11 @@ func (b *Builder) processImageFrom(img builder.Image) error {
|
| 384 | 384 |
} |
| 385 | 385 |
|
| 386 | 386 |
// Check to see if we have a default PATH, note that windows won't |
| 387 |
- // have one as its set by HCS |
|
| 387 |
+ // have one as it's set by HCS |
|
| 388 | 388 |
if system.DefaultPathEnv != "" {
|
| 389 | 389 |
// Convert the slice of strings that represent the current list |
| 390 | 390 |
// of env vars into a map so we can see if PATH is already set. |
| 391 |
- // If its not set then go ahead and give it our default value |
|
| 391 |
+ // If it's not set then go ahead and give it our default value |
|
| 392 | 392 |
configEnv := opts.ConvertKVStringsToMap(b.runConfig.Env) |
| 393 | 393 |
if _, ok := configEnv["PATH"]; !ok {
|
| 394 | 394 |
b.runConfig.Env = append(b.runConfig.Env, |
| ... | ... |
@@ -37,7 +37,7 @@ func runUnlock(dockerCli *command.DockerCli, opts unlockOptions) error {
|
| 37 | 37 |
client := dockerCli.Client() |
| 38 | 38 |
ctx := context.Background() |
| 39 | 39 |
|
| 40 |
- // First see if the node is actually part of a swarm, and if it's is actually locked first. |
|
| 40 |
+ // First see if the node is actually part of a swarm, and if it is actually locked first. |
|
| 41 | 41 |
// If it's in any other state than locked, don't ask for the key. |
| 42 | 42 |
info, err := client.Info(ctx) |
| 43 | 43 |
if err != nil {
|
| ... | ... |
@@ -239,7 +239,7 @@ func parseClusterAdvertiseSettings(clusterStore, clusterAdvertise string) (strin |
| 239 | 239 |
return advertise, nil |
| 240 | 240 |
} |
| 241 | 241 |
|
| 242 |
-// GetConflictFreeLabels validate Labels for conflict |
|
| 242 |
+// GetConflictFreeLabels validates Labels for conflict |
|
| 243 | 243 |
// In swarm the duplicates for labels are removed |
| 244 | 244 |
// so we only take same values here, no conflict values |
| 245 | 245 |
// If the key-value is the same we will only take the last label |
| ... | ... |
@@ -640,7 +640,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot |
| 640 | 640 |
logrus.Infof("Graph migration to content-addressability took %.2f seconds", time.Since(migrationStart).Seconds())
|
| 641 | 641 |
|
| 642 | 642 |
// Discovery is only enabled when the daemon is launched with an address to advertise. When |
| 643 |
- // initialized, the daemon is registered and we can store the discovery backend as its read-only |
|
| 643 |
+ // initialized, the daemon is registered and we can store the discovery backend as it's read-only |
|
| 644 | 644 |
if err := d.initDiscovery(config); err != nil {
|
| 645 | 645 |
return nil, err |
| 646 | 646 |
} |
| ... | ... |
@@ -301,7 +301,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes. |
| 301 | 301 |
return warnings, nil |
| 302 | 302 |
} |
| 303 | 303 |
|
| 304 |
-// platformReload update configuration with platform specific options |
|
| 304 |
+// platformReload updates configuration with platform specific options |
|
| 305 | 305 |
func (daemon *Daemon) platformReload(config *Config) map[string]string {
|
| 306 | 306 |
return map[string]string{}
|
| 307 | 307 |
} |
| ... | ... |
@@ -556,7 +556,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes. |
| 556 | 556 |
return warnings, nil |
| 557 | 557 |
} |
| 558 | 558 |
|
| 559 |
-// platformReload update configuration with platform specific options |
|
| 559 |
+// platformReload updates configuration with platform specific options |
|
| 560 | 560 |
func (daemon *Daemon) platformReload(config *Config) map[string]string {
|
| 561 | 561 |
if config.IsValueSet("runtimes") {
|
| 562 | 562 |
daemon.configStore.Runtimes = config.Runtimes |
| ... | ... |
@@ -203,7 +203,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes. |
| 203 | 203 |
return warnings, err |
| 204 | 204 |
} |
| 205 | 205 |
|
| 206 |
-// platformReload update configuration with platform specific options |
|
| 206 |
+// platformReload updates configuration with platform specific options |
|
| 207 | 207 |
func (daemon *Daemon) platformReload(config *Config) map[string]string {
|
| 208 | 208 |
return map[string]string{}
|
| 209 | 209 |
} |
| ... | ... |
@@ -119,7 +119,7 @@ func (daemon *Daemon) Kill(container *container.Container) error {
|
| 119 | 119 |
if err := daemon.killPossiblyDeadProcess(container, int(syscall.SIGKILL)); err != nil {
|
| 120 | 120 |
// While normally we might "return err" here we're not going to |
| 121 | 121 |
// because if we can't stop the container by this point then |
| 122 |
- // its probably because its already stopped. Meaning, between |
|
| 122 |
+ // it's probably because it's already stopped. Meaning, between |
|
| 123 | 123 |
// the time of the IsRunning() call above and now it stopped. |
| 124 | 124 |
// Also, since the err return will be environment specific we can't |
| 125 | 125 |
// look for any particular (common) error that would indicate |
| ... | ... |
@@ -52,7 +52,7 @@ func (daemon *Daemon) containerStop(container *container.Container, seconds int) |
| 52 | 52 |
if err := daemon.killPossiblyDeadProcess(container, stopSignal); err != nil {
|
| 53 | 53 |
// While normally we might "return err" here we're not going to |
| 54 | 54 |
// because if we can't stop the container by this point then |
| 55 |
- // its probably because its already stopped. Meaning, between |
|
| 55 |
+ // it's probably because it's already stopped. Meaning, between |
|
| 56 | 56 |
// the time of the IsRunning() call above and now it stopped. |
| 57 | 57 |
// Also, since the err return will be environment specific we can't |
| 58 | 58 |
// look for any particular (common) error that would indicate |