diff --git a/cli/command/trust/inspect.go b/cli/command/trust/inspect.go index ae481c1ab7d4..8724cef30e4b 100644 --- a/cli/command/trust/inspect.go +++ b/cli/command/trust/inspect.go @@ -14,9 +14,8 @@ import ( type inspectOptions struct { remotes []string - /* FIXME(n4ss): this is consistent with `docker service inspect` but we should provide - * a `--format` flag too. (format and pretty-print should be exclusive) - */ + // FIXME(n4ss): this is consistent with `docker service inspect` but we should provide + // a `--format` flag too. (format and pretty-print should be exclusive) prettyPrint bool } @@ -49,7 +48,7 @@ func runInspect(dockerCli command.Cli, opts inspectOptions) error { } // Additional separator between the inspection output of each image - if index < len(opts.remotes) - 1 { + if index < len(opts.remotes)-1 { fmt.Fprint(dockerCli.Out(), "\n\n") } } diff --git a/cli/command/trust/inspect_pretty_test.go b/cli/command/trust/inspect_pretty_test.go index f97b6239acef..24902afb3498 100644 --- a/cli/command/trust/inspect_pretty_test.go +++ b/cli/command/trust/inspect_pretty_test.go @@ -17,7 +17,7 @@ import ( "github.com/theupdateframework/notary/tuf/data" ) -/* TODO(n4ss): remove common tests with the regular inspect command */ +// TODO(n4ss): remove common tests with the regular inspect command type fakeClient struct { dockerClient.Client @@ -65,7 +65,7 @@ func TestTrustInspectPrettyCommandOfflineErrors(t *testing.T) { cli = test.NewFakeCli(&fakeClient{}) cli.SetNotaryClient(notaryfake.GetOfflineNotaryRepository) - cmd := newInspectCommand(cli) + cmd = newInspectCommand(cli) cmd.Flags().Set("pretty", "true") cmd.SetArgs([]string{"nonexistent-reg-name.io/image:tag"}) cmd.SetOutput(ioutil.Discard) @@ -83,7 +83,7 @@ func TestTrustInspectPrettyCommandUninitializedErrors(t *testing.T) { cli = test.NewFakeCli(&fakeClient{}) cli.SetNotaryClient(notaryfake.GetUninitializedNotaryRepository) - cmd := newInspectCommand(cli) + cmd = newInspectCommand(cli) cmd.Flags().Set("pretty", "true") cmd.SetArgs([]string{"reg/unsigned-img:tag"}) cmd.SetOutput(ioutil.Discard) @@ -103,7 +103,7 @@ func TestTrustInspectPrettyCommandEmptyNotaryRepoErrors(t *testing.T) { cli = test.NewFakeCli(&fakeClient{}) cli.SetNotaryClient(notaryfake.GetEmptyTargetsNotaryRepository) - cmd := newInspectCommand(cli) + cmd = newInspectCommand(cli) cmd.Flags().Set("pretty", "true") cmd.SetArgs([]string{"reg/img"}) cmd.SetOutput(ioutil.Discard)