cmd/kpod/images.go: Add structured format ouput

For kpod images, we need to output in JSON format so that consumers
(programatic) have structured input to work with.

kpod images --format json

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude 2017-07-31 13:02:57 -05:00
parent 5a3c168892
commit 01b71393e3
6 changed files with 155 additions and 60 deletions

View file

@ -21,9 +21,10 @@ Show image digests
Filter output based on conditions provided (default [])
**--format="TEMPLATE"**
**--format**
Pretty-print images using a Go template. Will override --quiet
Change the default output format. This can be of a supported type like 'json'
or a Go template.
**--noheading, -n**
@ -46,6 +47,10 @@ kpod images --quiet
kpod images -q --noheading --notruncate
kpod images --format json
kpod images --format "{{.ID}}"
## SEE ALSO
kpod(1)