withOutputFormat configures opts to emit structured output, as the --output flag would when parsed by cobra.
(opts *OpenOptions, format string)
| 84 | // withOutputFormat configures opts to emit structured output, as the --output |
| 85 | // flag would when parsed by cobra. |
| 86 | func withOutputFormat(opts *OpenOptions, format string) { |
| 87 | *opts.PrintFlags.OutputFormat = format |
| 88 | opts.PrintFlags.OutputFlagSpecified = func() bool { return true } |
| 89 | } |
| 90 | |
| 91 | func TestRunOpenCmd_ResourceShortcutNoAuth(t *testing.T) { |
| 92 | io, _, _, _ := iostreams.Test() |
no outgoing calls
no test coverage detected