diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-11 04:22:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 04:22:30 -0400 |
commit | a90ae00df1c2be0f3d46d4e7cd292599c93ded0f (patch) | |
tree | 3d7f7c2915d3420c124cf27114d63291c391f064 /cmd/podman | |
parent | 92b088b4a52a14126c8af2870b4b587abd49f7cb (diff) | |
parent | 6ebd257245a611246bb3ce9c6712c5eb19a9efb4 (diff) | |
download | podman-a90ae00df1c2be0f3d46d4e7cd292599c93ded0f.tar.gz podman-a90ae00df1c2be0f3d46d4e7cd292599c93ded0f.tar.bz2 podman-a90ae00df1c2be0f3d46d4e7cd292599c93ded0f.zip |
Merge pull request #7261 from zhangguanzhang/ps-format-add-field
Add the `Status` field in the ps --format=json
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/containers/ps.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index 64271031d..ebb6ed98f 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -109,6 +109,7 @@ func jsonOut(responses []entities.ListContainer) error { r := make([]entities.ListContainer, 0) for _, con := range responses { con.CreatedAt = units.HumanDuration(time.Since(time.Unix(con.Created, 0))) + " ago" + con.Status = psReporter{con}.Status() r = append(r, con) } b, err := json.MarshalIndent(r, "", " ") |