From 534bfc2301e386499239d38a95ec8adc7c22ef97 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 11 Apr 2023 17:55:00 +0200 Subject: [PATCH] cli/command/registry: remove intermediate var that collided This also simplifies the code a bit. Signed-off-by: Sebastiaan van Stijn --- cli/command/registry/search.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cli/command/registry/search.go b/cli/command/registry/search.go index 9efc1f3d5a..8c27b9c207 100644 --- a/cli/command/registry/search.go +++ b/cli/command/registry/search.go @@ -63,16 +63,12 @@ func runSearch(dockerCli command.Cli, options searchOptions) error { return err } - searchOptions := types.ImageSearchOptions{ + results, err := dockerCli.Client().ImageSearch(ctx, options.term, types.ImageSearchOptions{ RegistryAuth: encodedAuth, PrivilegeFunc: requestPrivilege, Filters: options.filter.Value(), Limit: options.limit, - } - - clnt := dockerCli.Client() - - results, err := clnt.ImageSearch(ctx, options.term, searchOptions) + }) if err != nil { return err }