From ca9276640f494989a3fde0e7bc47ce9ae69fb223 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 17 Nov 2020 11:12:06 -0700 Subject: Fix missing headers in `network ls` Signed-off-by: Jhon Honce --- cmd/podman/networks/list.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd/podman') 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) } -- cgit v1.2.3-54-g00ecf