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

Method SetOut

command.go:296–298  ·  view source on GitHub ↗

SetOut sets the destination for usage messages. If newOut is nil, os.Stdout is used.

(newOut io.Writer)

Source from the content-addressed store, hash-verified

294// SetOut sets the destination for usage messages.
295// If newOut is nil, os.Stdout is used.
296func (c *Command) SetOut(newOut io.Writer) {
297 c.outWriter = newOut
298}
299
300// SetErr sets the destination for error messages.
301// If newErr is nil, os.Stderr is used.

Callers 6

TestSetOutFunction · 0.95
testMethod · 0.95
executeCommandCFunction · 0.80

Calls

no outgoing calls

Tested by 6

TestSetOutFunction · 0.76
testMethod · 0.76
executeCommandCFunction · 0.64