Skip to content

Commit 632f179

Browse files
committed
cli/command/image: minor cleanups
- use apiClient instead of client for the API client to prevent shadowing imports. - use dockerCLI with Go's standard camelCase casing. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent e81d76f commit 632f179

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

cli/command/image/inspect.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ func newInspectCommand(dockerCli command.Cli) *cobra.Command {
3939
return cmd
4040
}
4141

42-
func runInspect(ctx context.Context, dockerCli command.Cli, opts inspectOptions) error {
43-
client := dockerCli.Client()
44-
getRefFunc := func(ref string) (any, []byte, error) {
45-
return client.ImageInspectWithRaw(ctx, ref)
46-
}
47-
return inspect.Inspect(dockerCli.Out(), opts.refs, opts.format, getRefFunc)
42+
func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error {
43+
apiClient := dockerCLI.Client()
44+
return inspect.Inspect(dockerCLI.Out(), opts.refs, opts.format, func(ref string) (any, []byte, error) {
45+
return apiClient.ImageInspectWithRaw(ctx, ref)
46+
})
4847
}

0 commit comments

Comments
 (0)