Skip to content

Commit

Permalink
cli/command: fix formatting of comments, and minor linting issues
Browse files Browse the repository at this point in the history
Comments should have a leading space unless the comment is
for special purposes (go:generate, nolint:)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jan 16, 2020
1 parent 6e5528b commit 73dcf50
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cli/command/container/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio

statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)

//start the container
// start the container
if err := client.ContainerStart(ctx, createResponse.ID, types.ContainerStartOptions{}); err != nil {
// If we have hijackedIOStreamer, we should notify
// hijackedIOStreamer we are going to exit and wait
Expand Down
8 changes: 3 additions & 5 deletions cli/command/defaultcontextstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ func testDefaultMetadata() store.Metadata {
}

func testStore(t *testing.T, meta store.Metadata, tls store.ContextTLSData) (store.Store, func()) {
//meta := testDefaultMetadata()
testDir, err := ioutil.TempDir("", t.Name())
assert.NilError(t, err)
//defer os.RemoveAll(testDir)
store := &ContextStoreWithDefault{
s := &ContextStoreWithDefault{
Store: store.New(testDir, testCfg),
Resolver: func() (*DefaultContext, error) {
return &DefaultContext{
Expand All @@ -53,8 +51,8 @@ func testStore(t *testing.T, meta store.Metadata, tls store.ContextTLSData) (sto
}, nil
},
}
return store, func() {
os.RemoveAll(testDir)
return s, func() {
_ = os.RemoveAll(testDir)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/build_buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
buildOptions := imageBuildOptions(dockerCli, options)
buildOptions.Version = types.BuilderBuildKit
buildOptions.Dockerfile = dockerfileName
//buildOptions.AuthConfigs = authConfigs // handled by session
// buildOptions.AuthConfigs = authConfigs // handled by session
buildOptions.RemoteContext = remote
buildOptions.SessionID = s.ID()
buildOptions.BuildID = buildID
Expand Down
2 changes: 1 addition & 1 deletion cli/command/service/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ portLoop:
if _, ok := portSet[portConfigToString(&port)]; ok {
continue
}
//portSet[portConfigToString(&port)] = port
// portSet[portConfigToString(&port)] = port
newPorts = append(newPorts, port)
}
}
Expand Down

0 comments on commit 73dcf50

Please sign in to comment.