Merge pull request #776 from umohnani8/kpod_ps

Add 'kpod ps' command
This commit is contained in:
Daniel J Walsh 2017-08-23 07:08:31 -04:00 committed by GitHub
commit 7af1ae71ed
10 changed files with 1001 additions and 24 deletions

View file

@ -1,7 +1,6 @@
package main
import (
"fmt"
"reflect"
"strings"
@ -110,7 +109,7 @@ func imagesCmd(c *cli.Context) error {
func genImagesFormat(quiet, truncate, digests bool) (format string) {
if quiet {
return "{{.ID}}"
return formats.IDString
}
if truncate {
format = "table {{ .ID | printf \"%-20.12s\" }} "
@ -201,7 +200,7 @@ func (i *imageOutputParams) headerMap() map[string]string {
if value == "ID" || value == "Name" {
value = "Image" + value
}
values[key] = fmt.Sprintf("%s ", strings.ToUpper(splitCamelCase(value)))
values[key] = strings.ToUpper(splitCamelCase(value))
}
return values
}