summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-17 20:30:56 +0100
committerGitHub <noreply@github.com>2020-11-17 20:30:56 +0100
commit65880e556314d1d8cb3cf12e20666b823eab8c76 (patch)
tree3f212caeb526f4fc8b006fd7c4ff11f8c7340e4e
parentf500fc955c60a39e6f661a9cf2acfb4c60757843 (diff)
parentca9276640f494989a3fde0e7bc47ce9ae69fb223 (diff)
downloadpodman-65880e556314d1d8cb3cf12e20666b823eab8c76.tar.gz
podman-65880e556314d1d8cb3cf12e20666b823eab8c76.tar.bz2
podman-65880e556314d1d8cb3cf12e20666b823eab8c76.zip
Merge pull request #8377 from jwhonce/wip/formats
Fix missing headers in `network ls`
-rw-r--r--cmd/podman/networks/list.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go
index bab6b45ea..f2a5a431a 100644
--- a/cmd/podman/networks/list.go
+++ b/cmd/podman/networks/list.go
@@ -87,8 +87,11 @@ func networkList(cmd *cobra.Command, args []string) error {
nlprs = append(nlprs, ListPrintReports{r})
}
+ // Headers() gets lost resolving the embedded field names so add them
headers := report.Headers(ListPrintReports{}, map[string]string{
+ "Name": "name",
"CNIVersion": "version",
+ "Version": "version",
"Plugins": "plugins",
})
renderHeaders := true
@@ -110,7 +113,6 @@ func networkList(cmd *cobra.Command, args []string) error {
if err := tmpl.Execute(w, headers); err != nil {
return err
}
-
}
return tmpl.Execute(w, nlprs)
}