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 }