MCPcopy Create free account
hub / github.com/algolia/cli / withOutputFormat

Function withOutputFormat

pkg/cmd/open/open_test.go:86–89  ·  view source on GitHub ↗

withOutputFormat configures opts to emit structured output, as the --output flag would when parsed by cobra.

(opts *OpenOptions, format string)

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected