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>
Upstream-commit: 89a6966726941b4b7f0431ab214013cf9c655c25
Component: engine
This commit is contained in:
Zhang Wei
2016-11-01 22:01:16 +08:00
parent d375460d63
commit 9cb45952e0
23 changed files with 55 additions and 55 deletions

View File

@ -51,7 +51,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
client := dockerCli.Client()
out := dockerCli.Out()
services, err := client.ServiceList(ctx, types.ServiceListOptions{Filter: opts.filter.Value()})
services, err := client.ServiceList(ctx, types.ServiceListOptions{Filters: opts.filter.Value()})
if err != nil {
return err
}
@ -63,7 +63,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
taskFilter.Add("service", service.ID)
}
tasks, err := client.TaskList(ctx, types.TaskListOptions{Filter: taskFilter})
tasks, err := client.TaskList(ctx, types.TaskListOptions{Filters: taskFilter})
if err != nil {
return err
}

View File

@ -64,7 +64,7 @@ func runPS(dockerCli *command.DockerCli, opts psOptions) error {
}
}
tasks, err := client.TaskList(ctx, types.TaskListOptions{Filter: filter})
tasks, err := client.TaskList(ctx, types.TaskListOptions{Filters: filter})
if err != nil {
return err
}