mirror of https://github.com/docker/cli.git
cli/command: fix formatting of comments, and minor linting issues
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>
This commit is contained in:
parent
6e5528b650
commit
73dcf50d5a
|
@ -164,7 +164,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
|
||||||
|
|
||||||
statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)
|
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 err := client.ContainerStart(ctx, createResponse.ID, types.ContainerStartOptions{}); err != nil {
|
||||||
// If we have hijackedIOStreamer, we should notify
|
// If we have hijackedIOStreamer, we should notify
|
||||||
// hijackedIOStreamer we are going to exit and wait
|
// hijackedIOStreamer we are going to exit and wait
|
||||||
|
|
|
@ -40,11 +40,9 @@ func testDefaultMetadata() store.Metadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
func testStore(t *testing.T, meta store.Metadata, tls store.ContextTLSData) (store.Store, func()) {
|
func testStore(t *testing.T, meta store.Metadata, tls store.ContextTLSData) (store.Store, func()) {
|
||||||
//meta := testDefaultMetadata()
|
|
||||||
testDir, err := ioutil.TempDir("", t.Name())
|
testDir, err := ioutil.TempDir("", t.Name())
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
//defer os.RemoveAll(testDir)
|
s := &ContextStoreWithDefault{
|
||||||
store := &ContextStoreWithDefault{
|
|
||||||
Store: store.New(testDir, testCfg),
|
Store: store.New(testDir, testCfg),
|
||||||
Resolver: func() (*DefaultContext, error) {
|
Resolver: func() (*DefaultContext, error) {
|
||||||
return &DefaultContext{
|
return &DefaultContext{
|
||||||
|
@ -53,8 +51,8 @@ func testStore(t *testing.T, meta store.Metadata, tls store.ContextTLSData) (sto
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return store, func() {
|
return s, func() {
|
||||||
os.RemoveAll(testDir)
|
_ = os.RemoveAll(testDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
|
||||||
buildOptions := imageBuildOptions(dockerCli, options)
|
buildOptions := imageBuildOptions(dockerCli, options)
|
||||||
buildOptions.Version = types.BuilderBuildKit
|
buildOptions.Version = types.BuilderBuildKit
|
||||||
buildOptions.Dockerfile = dockerfileName
|
buildOptions.Dockerfile = dockerfileName
|
||||||
//buildOptions.AuthConfigs = authConfigs // handled by session
|
// buildOptions.AuthConfigs = authConfigs // handled by session
|
||||||
buildOptions.RemoteContext = remote
|
buildOptions.RemoteContext = remote
|
||||||
buildOptions.SessionID = s.ID()
|
buildOptions.SessionID = s.ID()
|
||||||
buildOptions.BuildID = buildID
|
buildOptions.BuildID = buildID
|
||||||
|
|
|
@ -1036,7 +1036,7 @@ portLoop:
|
||||||
if _, ok := portSet[portConfigToString(&port)]; ok {
|
if _, ok := portSet[portConfigToString(&port)]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
//portSet[portConfigToString(&port)] = port
|
// portSet[portConfigToString(&port)] = port
|
||||||
newPorts = append(newPorts, port)
|
newPorts = append(newPorts, port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue