From 36c1bd7b5c925b8e04f6e4baf2afc697c9fa4e85 Mon Sep 17 00:00:00 2001 From: David Alpert Date: Sun, 19 Nov 2023 11:28:44 -0600 Subject: [PATCH] fix: default output format not set properly I was setting the wrong property in contradiction with the logic around default output format fixes: #1 --- v1/printer_options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/printer_options.go b/v1/printer_options.go index 1c9dba1..9ae6ab6 100644 --- a/v1/printer_options.go +++ b/v1/printer_options.go @@ -31,7 +31,7 @@ func (o *PrinterOptions) WithStreams(s IOStreams) *PrinterOptions { // WithDefaultOutput sets a default output format if one is not provided through a flag value func (o *PrinterOptions) WithDefaultOutput(output string) *PrinterOptions { - o.OutputFormat = &output + o.DefaultOutputFormat = &output return o }