From d5ccd73646cbbc454c0ae8fd2bd6fd23f0d4e119 Mon Sep 17 00:00:00 2001 From: Cyril David Date: Fri, 22 Jan 2021 19:48:29 -0800 Subject: [PATCH] Ensure init is called in all Renderer methods --- internal/display/display.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/display/display.go b/internal/display/display.go index aebccf155..92a14d7b1 100644 --- a/internal/display/display.go +++ b/internal/display/display.go @@ -68,6 +68,8 @@ func (r *Renderer) Errorf(format string, a ...interface{}) { } func (r *Renderer) Heading(text ...string) { + r.init() + fmt.Fprintf(r.MessageWriter, "%s %s\n", ansi.Faint("==="), strings.Join(text, " ")) } @@ -77,6 +79,8 @@ type View interface { } func (r *Renderer) Results(data []View) { + r.init() + if len(data) > 0 { switch r.Format { case OutputFormatJSON: