summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/inspect.go5
-rw-r--r--cmd/podman/pods/ps.go5
-rw-r--r--cmd/podman/pods/stats.go5
3 files changed, 6 insertions, 9 deletions
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go
index 659ebe1f0..7f81ba8fb 100644
--- a/cmd/podman/pods/inspect.go
+++ b/cmd/podman/pods/inspect.go
@@ -7,9 +7,8 @@ import (
"text/tabwriter"
"text/template"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/pkg/errors"
@@ -62,7 +61,7 @@ func inspect(cmd *cobra.Command, args []string) error {
return err
}
- if parse.MatchesJSONFormat(inspectOptions.Format) {
+ if report.IsJSON(inspectOptions.Format) {
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
return enc.Encode(responses)
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index aa9094428..688108c1a 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -10,9 +10,8 @@ import (
"text/template"
"time"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/docker/go-units"
@@ -85,7 +84,7 @@ func pods(cmd *cobra.Command, _ []string) error {
}
switch {
- case parse.MatchesJSONFormat(psInput.Format):
+ case report.IsJSON(psInput.Format):
b, err := json.MarshalIndent(responses, "", " ")
if err != nil {
return err
diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go
index 38ecac97e..338f13d3e 100644
--- a/cmd/podman/pods/stats.go
+++ b/cmd/podman/pods/stats.go
@@ -9,9 +9,8 @@ import (
"time"
"github.com/buger/goterm"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/spf13/cobra"
@@ -66,7 +65,7 @@ func stats(cmd *cobra.Command, args []string) error {
}
row := report.NormalizeFormat(statsOptions.Format)
- doJSON := parse.MatchesJSONFormat(row)
+ doJSON := report.IsJSON(row)
headers := report.Headers(entities.PodStatsReport{}, map[string]string{
"CPU": "CPU %",