From 632f179e8f3976bbbdd4f8612592263cc156463a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 3 Feb 2025 19:04:54 +0100 Subject: [PATCH] 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 --- cli/command/image/inspect.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cli/command/image/inspect.go b/cli/command/image/inspect.go index b0e4fba527..a57dacbc60 100644 --- a/cli/command/image/inspect.go +++ b/cli/command/image/inspect.go @@ -39,10 +39,9 @@ func newInspectCommand(dockerCli command.Cli) *cobra.Command { return cmd } -func runInspect(ctx context.Context, dockerCli command.Cli, opts inspectOptions) error { - client := dockerCli.Client() - getRefFunc := func(ref string) (any, []byte, error) { - return client.ImageInspectWithRaw(ctx, ref) - } - return inspect.Inspect(dockerCli.Out(), opts.refs, opts.format, getRefFunc) +func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error { + apiClient := dockerCLI.Client() + return inspect.Inspect(dockerCLI.Out(), opts.refs, opts.format, func(ref string) (any, []byte, error) { + return apiClient.ImageInspectWithRaw(ctx, ref) + }) }