From d60a0ddcc1784b2dd807cc8e4d4f3deb0c074171 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 28 Oct 2020 11:03:09 -0700 Subject: Restore --format table header support Signed-off-by: Jhon Honce --- cmd/podman/pods/stats.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/podman/pods/stats.go') diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go index 338f13d3e..c5d1e7f07 100644 --- a/cmd/podman/pods/stats.go +++ b/cmd/podman/pods/stats.go @@ -10,6 +10,7 @@ import ( "github.com/buger/goterm" "github.com/containers/common/pkg/report" + "github.com/containers/podman/v2/cmd/podman/parse" "github.com/containers/podman/v2/cmd/podman/registry" "github.com/containers/podman/v2/cmd/podman/validate" "github.com/containers/podman/v2/pkg/domain/entities" @@ -135,7 +136,7 @@ func printFormattedPodStatsLines(headerNames []map[string]string, row string, st return nil } - row = "{{range .}}" + row + "{{end}}" + row = parse.EnforceRange(row) tmpl, err := template.New("pod stats").Parse(row) if err != nil { -- cgit v1.2.3-54-g00ecf