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

Method getErr

command.go:422–430  ·  view source on GitHub ↗
(def io.Writer)

Source from the content-addressed store, hash-verified

420}
421
422func (c *Command) getErr(def io.Writer) io.Writer {
423 if c.errWriter != nil {
424 return c.errWriter
425 }
426 if c.HasParent() {
427 return c.parent.getErr(def)
428 }
429 return def
430}
431
432func (c *Command) getIn(def io.Reader) io.Reader {
433 if c.inReader != nil {

Callers 1

ErrOrStderrMethod · 0.95

Calls 1

HasParentMethod · 0.95

Tested by

no test coverage detected