rm GetStandardPrinter

This commit is contained in:
juanvallejo
2018-05-02 14:49:49 -04:00
parent 5a34e4f594
commit a74b28d961
9 changed files with 23 additions and 237 deletions

View File

@@ -91,15 +91,7 @@ func (f *PrintFlags) AddFlags(cmd *cobra.Command) {
// WithDefaultOutput sets a default output format if one is not provided through a flag value
func (f *PrintFlags) WithDefaultOutput(output string) *PrintFlags {
existingFormat := ""
if f.OutputFormat != nil {
existingFormat = *f.OutputFormat
}
if len(existingFormat) == 0 {
existingFormat = output
}
f.OutputFormat = &existingFormat
f.OutputFormat = &output
return f
}