cmd, ps: add .Status as synonym for .State
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
e88b2dc0c9
commit
edbdbe5b3a
|
|
@ -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, " ")
|
||||
|
|
|
|||
Loading…
Reference in New Issue