MCPcopy
hub / github.com/spf13/cobra / SetOutput

Method SetOutput

command.go:289–292  ·  view source on GitHub ↗

SetOutput sets the destination for usage and error messages. If output is nil, os.Stderr is used. Deprecated: Use SetOut and/or SetErr instead

(output io.Writer)

Source from the content-addressed store, hash-verified

287//
288// Deprecated: Use SetOut and/or SetErr instead
289func (c *Command) SetOutput(output io.Writer) {
290 c.outWriter = output
291 c.errWriter = output
292}
293
294// SetOut sets the destination for usage messages.
295// If newOut is nil, os.Stdout is used.

Callers 9

TestSetOutputFunction · 0.95
FlagsMethod · 0.80
LocalFlagsMethod · 0.80
InheritedFlagsMethod · 0.80
PersistentFlagsMethod · 0.80
ResetFlagsMethod · 0.80
updateParentsPflagsMethod · 0.80
printOptionsReSTFunction · 0.80
printOptionsFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSetOutputFunction · 0.76