Merge pull request #384 from vieux/fix_port_filter

fix port filter cli
This commit is contained in:
Andrea Luzzardi 2015-02-10 11:56:25 -08:00
commit df3a80db5b
2 changed files with 3 additions and 2 deletions

View File

@ -86,7 +86,8 @@ var (
}
// hack for go vet
flFilterValue = cli.StringSlice([]string{"constraint", "affinity", "health", "port"})
flFilterValue = cli.StringSlice([]string{"constraint", "affinity", "health", "port"})
DEFAULT_FILTER_NUMBER = len(flFilterValue)
flFilter = cli.StringSliceFlag{
Name: "filter, f",

View File

@ -113,7 +113,7 @@ func manage(c *cli.Context) {
// see https://github.com/codegangsta/cli/issues/160
names := c.StringSlice("filter")
if c.IsSet("filter") || c.IsSet("f") {
names = names[3:]
names = names[DEFAULT_FILTER_NUMBER:]
}
fs, err := filter.New(names)
if err != nil {