summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 09:40:56 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 11:59:21 +0200
commitedbdbe5b3a3581be87b6e5763316b4d3f6a1ae54 (patch)
treec5770a018763c8522e16c7f292a4ea63c2c013c2 /cmd
parente88b2dc0c9ba6ddadb6bf31f652e1ad41468f58f (diff)
downloadpodman-edbdbe5b3a3581be87b6e5763316b4d3f6a1ae54.tar.gz
podman-edbdbe5b3a3581be87b6e5763316b4d3f6a1ae54.tar.bz2
podman-edbdbe5b3a3581be87b6e5763316b4d3f6a1ae54.zip
cmd, ps: add .Status as synonym for .State
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/ps.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go
index 49e77abd2..a006e918d 100644
--- a/cmd/podman/containers/ps.go
+++ b/cmd/podman/containers/ps.go
@@ -223,7 +223,7 @@ func createPsOut() (string, string) {
}
headers := defaultHeaders
row += "{{.ID}}"
- row += "\t{{.Image}}\t{{.Command}}\t{{.CreatedHuman}}\t{{.State}}\t{{.Ports}}\t{{.Names}}"
+ row += "\t{{.Image}}\t{{.Command}}\t{{.CreatedHuman}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}"
if listOpts.Pod {
headers += "\tPOD ID\tPODNAME"
@@ -282,6 +282,11 @@ func (l psReporter) State() string {
return state
}
+// Status is a synonym for State()
+func (l psReporter) Status() string {
+ return l.State()
+}
+
// Command returns the container command in string format
func (l psReporter) Command() string {
return strings.Join(l.ListContainer.Command, " ")