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

Method SetErr

command.go:302–304  ·  view source on GitHub ↗

SetErr sets the destination for error messages. If newErr is nil, os.Stderr is used.

(newErr io.Writer)

Source from the content-addressed store, hash-verified

300// SetErr sets the destination for error messages.
301// If newErr is nil, os.Stderr is used.
302func (c *Command) SetErr(newErr io.Writer) {
303 c.errWriter = newErr
304}
305
306// SetIn sets the source for input data
307// If newIn is nil, os.Stdin is used.

Callers 6

TestSetErrFunction · 0.95
testMethod · 0.95
executeCommandCFunction · 0.80

Calls

no outgoing calls

Tested by 6

TestSetErrFunction · 0.76
testMethod · 0.76
executeCommandCFunction · 0.64