Files
docker-cli/cli/command/container
Sebastiaan van Stijn 69f216f6e4 Fix docker ps --format with templating functions
Before this patch, using a template that used templating functions (such as
`lower` or `json`) caused the command to fail in the pre-processor step (in
`buildContainerListOptions`):

    docker ps --format='{{upper .Names}}'
    template: :1:8: executing "" at <.Names>: invalid value; expected string

This problem was due to the pre-processing using a different "context" type than
was used in the actual template, and custom functions to not be defined when
instantiating the Go template.

With this patch, using functions in templates works correctly:

    docker ps --format='{{upper .Names}}'
    MUSING_NEUMANN
    ELOQUENT_MEITNER

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-27 12:35:55 +01:00
..
2018-06-08 18:24:26 +02:00
2019-02-12 09:14:50 +08:00
2017-10-26 12:21:02 -04:00
2018-05-11 16:49:43 -07:00
2018-10-23 17:05:44 +02:00
2018-06-08 18:24:26 +02:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2018-06-08 18:24:26 +02:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2018-09-05 00:01:16 +00:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00
2019-02-12 09:14:50 +08:00
2019-02-12 09:14:50 +08:00
2018-06-08 18:24:26 +02:00
2018-05-11 16:49:43 -07:00
2018-05-11 16:49:43 -07:00