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

Method getOut

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

Source from the content-addressed store, hash-verified

410}
411
412func (c *Command) getOut(def io.Writer) io.Writer {
413 if c.outWriter != nil {
414 return c.outWriter
415 }
416 if c.HasParent() {
417 return c.parent.getOut(def)
418 }
419 return def
420}
421
422func (c *Command) getErr(def io.Writer) io.Writer {
423 if c.errWriter != nil {

Callers 2

OutOrStdoutMethod · 0.95
OutOrStderrMethod · 0.95

Calls 1

HasParentMethod · 0.95

Tested by

no test coverage detected