diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-13 21:03:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 21:03:21 +0100 |
commit | 796ae87b1a3444557644944ddeb7cb37e303ef83 (patch) | |
tree | 192bd260c0b35519fe45ecbc91d7212251d82495 /cmd/podman/pod_stats.go | |
parent | c1d93666d4b175be29a0ba229ee0b94d50765888 (diff) | |
parent | 768c476ae3c1dbf37204f5769b43746358af899d (diff) | |
download | podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.gz podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.bz2 podman-796ae87b1a3444557644944ddeb7cb37e303ef83.zip |
Merge pull request #4850 from vrothberg/fix-linting
Fix linting
Diffstat (limited to 'cmd/podman/pod_stats.go')
-rw-r--r-- | cmd/podman/pod_stats.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cmd/podman/pod_stats.go b/cmd/podman/pod_stats.go index 2f1ebd3ac..297603410 100644 --- a/cmd/podman/pod_stats.go +++ b/cmd/podman/pod_stats.go @@ -124,10 +124,8 @@ func podStatsCmd(c *cliconfig.PodStatsValues) error { for i := 0; i < t.NumField(); i++ { value := strings.ToUpper(splitCamelCase(t.Field(i).Name)) switch value { - case "CPU": - value = value + " %" - case "MEM": - value = value + " %" + case "CPU", "MEM": + value += " %" case "MEM USAGE": value = "MEM USAGE / LIMIT" } @@ -167,10 +165,8 @@ func podStatsCmd(c *cliconfig.PodStatsValues) error { results := podContainerStatsToPodStatOut(newStats) if len(format) == 0 { outputToStdOut(results) - } else { - if err := printPSFormat(c.Format, results, headerNames); err != nil { - return err - } + } else if err := printPSFormat(c.Format, results, headerNames); err != nil { + return err } } time.Sleep(time.Second) |