diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-21 16:13:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 16:13:06 -0400 |
commit | ba1b5d4559d336b5d52d961eb273f6fe40c50d8f (patch) | |
tree | 765af64fae0f2c3156178e5c71d6d2cb19f1d111 /cmd/podman/pods | |
parent | 02bd8cef7b7286f8955a68a00294c08d81803a4a (diff) | |
parent | b21a5b7ff470612e2bde5f120aecfbc1a0881689 (diff) | |
download | podman-ba1b5d4559d336b5d52d961eb273f6fe40c50d8f.tar.gz podman-ba1b5d4559d336b5d52d961eb273f6fe40c50d8f.tar.bz2 podman-ba1b5d4559d336b5d52d961eb273f6fe40c50d8f.zip |
Merge pull request #5851 from jwhonce/wip/json
Provide a json variable pointing to a configured json API
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r-- | cmd/podman/pods/inspect.go | 3 | ||||
-rw-r--r-- | cmd/podman/pods/pod.go | 3 | ||||
-rw-r--r-- | cmd/podman/pods/ps.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go index 901ae50b2..1e333247b 100644 --- a/cmd/podman/pods/inspect.go +++ b/cmd/podman/pods/inspect.go @@ -6,7 +6,6 @@ import ( "github.com/containers/libpod/cmd/podman/registry" "github.com/containers/libpod/pkg/domain/entities" - jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/spf13/cobra" ) @@ -55,7 +54,7 @@ func inspect(cmd *cobra.Command, args []string) error { if err != nil { return err } - b, err := jsoniter.MarshalIndent(responses, "", " ") + b, err := json.MarshalIndent(responses, "", " ") if err != nil { return err } diff --git a/cmd/podman/pods/pod.go b/cmd/podman/pods/pod.go index fa917b2ae..e86b8aba4 100644 --- a/cmd/podman/pods/pod.go +++ b/cmd/podman/pods/pod.go @@ -8,6 +8,9 @@ import ( ) var ( + // Pull in configured json library + json = registry.JsonLibrary() + // Command: podman _pod_ podCmd = &cobra.Command{ Use: "pod", diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go index 8cb7b6266..808980eff 100644 --- a/cmd/podman/pods/ps.go +++ b/cmd/podman/pods/ps.go @@ -2,7 +2,6 @@ package pods import ( "context" - "encoding/json" "fmt" "io" "os" @@ -11,10 +10,9 @@ import ( "text/template" "time" - "github.com/docker/go-units" - "github.com/containers/libpod/cmd/podman/registry" "github.com/containers/libpod/pkg/domain/entities" + "github.com/docker/go-units" "github.com/pkg/errors" "github.com/spf13/cobra" ) |