mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
@@ -50,7 +50,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
|
||||
|
||||
nodes, err := client.NodeList(
|
||||
ctx,
|
||||
types.NodeListOptions{Filter: opts.filter.Value()})
|
||||
types.NodeListOptions{Filters: opts.filter.Value()})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func runPs(dockerCli *command.DockerCli, opts psOptions) error {
|
||||
filter := opts.filter.Value()
|
||||
filter.Add("node", node.ID)
|
||||
|
||||
nodeTasks, err := client.TaskList(ctx, types.TaskListOptions{Filter: filter})
|
||||
nodeTasks, err := client.TaskList(ctx, types.TaskListOptions{Filters: filter})
|
||||
if err != nil {
|
||||
errs = append(errs, err.Error())
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user