Skip to content

Commit 534bfc2

Browse files
committed
cli/command/registry: remove intermediate var that collided
This also simplifies the code a bit. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 5e76d41 commit 534bfc2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

cli/command/registry/search.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,12 @@ func runSearch(dockerCli command.Cli, options searchOptions) error {
6363
return err
6464
}
6565

66-
searchOptions := types.ImageSearchOptions{
66+
results, err := dockerCli.Client().ImageSearch(ctx, options.term, types.ImageSearchOptions{
6767
RegistryAuth: encodedAuth,
6868
PrivilegeFunc: requestPrivilege,
6969
Filters: options.filter.Value(),
7070
Limit: options.limit,
71-
}
72-
73-
clnt := dockerCli.Client()
74-
75-
results, err := clnt.ImageSearch(ctx, options.term, searchOptions)
71+
})
7672
if err != nil {
7773
return err
7874
}

0 commit comments

Comments
 (0)