aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/networks
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/networks')
-rw-r--r--cmd/podman/networks/list.go10
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")