diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-17 13:58:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 13:58:47 -0400 |
commit | 725b5001a17f703d95a3c88e4f58225c5290576b (patch) | |
tree | e1caa3b2d18ca0fed2a4fddb8c434e007dc604a6 /cmd/podman/networks/list.go | |
parent | 814a8b6d715e1e8d729c58921695c65eec0e71bc (diff) | |
parent | bd9987239dae148bfd3eea8540d21ae7715faff7 (diff) | |
download | podman-725b5001a17f703d95a3c88e4f58225c5290576b.tar.gz podman-725b5001a17f703d95a3c88e4f58225c5290576b.tar.bz2 podman-725b5001a17f703d95a3c88e4f58225c5290576b.zip |
Merge pull request #10688 from jwhonce/bz/1855983
Scrub podman commands to use report package
Diffstat (limited to 'cmd/podman/networks/list.go')
-rw-r--r-- | cmd/podman/networks/list.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go index 46872d078..0ac637ea5 100644 --- a/cmd/podman/networks/list.go +++ b/cmd/podman/networks/list.go @@ -4,8 +4,6 @@ import ( "fmt" "os" "strings" - "text/tabwriter" - "text/template" "github.com/containers/common/pkg/completion" "github.com/containers/common/pkg/report" @@ -133,11 +131,15 @@ func templateOut(responses []*entities.NetworkListReport, cmd *cobra.Command) er } format = report.EnforceRange(row) - tmpl, err := template.New("listNetworks").Parse(format) + tmpl, err := report.NewTemplate("list").Parse(format) + if err != nil { + return err + } + + w, err := report.NewWriterDefault(os.Stdout) if err != nil { return err } - w := tabwriter.NewWriter(os.Stdout, 8, 2, 2, ' ', 0) defer w.Flush() noHeading, _ := cmd.Flags().GetBool("noheading") |