cli/command/registry: remove intermediate var that collided

This also simplifies the code a bit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-04-11 17:55:00 +02:00
parent 5e76d41bf6
commit 534bfc2301
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 6 deletions

View File

@ -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
}