var columnsFormats … type CustomColumnsPrintFlags … func (f *CustomColumnsPrintFlags) AllowedFormats() []string { … } // ToPrinter receives an templateFormat and returns a printer capable of // handling custom-column printing. // Returns false if the specified templateFormat does not match a supported format. // Supported format types can be found in pkg/printers/printers.go func (f *CustomColumnsPrintFlags) ToPrinter(templateFormat string) (printers.ResourcePrinter, error) { … } // AddFlags receives a *cobra.Command reference and binds // flags related to custom-columns printing func (f *CustomColumnsPrintFlags) AddFlags(c *cobra.Command) { … } // NewCustomColumnsPrintFlags returns flags associated with // custom-column printing, with default values set. // NoHeaders and TemplateArgument should be set by callers. func NewCustomColumnsPrintFlags() *CustomColumnsPrintFlags { … }