Print renders a value with the configured printer.
(ios *iostreams.IOStreams, value interface{})
| 93 | |
| 94 | // Print renders a value with the configured printer. |
| 95 | func (f *PrintFlags) Print(ios *iostreams.IOStreams, value interface{}) error { |
| 96 | p, err := f.ToPrinter() |
| 97 | if err != nil { |
| 98 | return err |
| 99 | } |
| 100 | return p.Print(ios, value) |
| 101 | } |
| 102 | |
| 103 | func (f *PrintFlags) AddFlags(cmd *cobra.Command) { |
| 104 | f.JSONPrintFlags.AddFlags(cmd) |