1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli
Yong Tang b194252d80 Fix failure in docker ps --format when .Label has args
This fix tries to fix the issue in 30279 where  `docker ps --format`
fails if `.Label` has args. For example:
```
docker ps --format '{{.ID}}\t{{.Names}}\t{{.Label "some.label"}}'
```

The reason for the failure is that during the preprocessing phase
to detect the existance of `.Size`, the `listOptionsProcessor`
does not has a method of `Label(name string) string`.

This results in the failure of
```
template: :1:24: executing "" at <.Label>: Label is not a method but has arguments
```

This fix fixes the issue by adding needed method of `Label(name string) string`.

This fix fixes 30279.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 2cd4ba1e56)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-24 17:45:05 -08:00
..
command Fix failure in docker ps --format when .Label has args 2017-01-24 17:45:05 -08:00
flags Trim quotes from TLS flags. 2017-01-04 12:43:17 +01:00
trust Support for docker content trust for plugins 2016-12-27 14:27:28 -08:00
cobra.go exit with status 1 if help is called on an invalid command. 2016-11-28 11:18:28 -08:00
error.go Remove old cli framework. 2016-08-25 13:09:04 -04:00
required.go fix typos 2016-07-05 20:42:17 +08:00