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

Method PrintErr

command.go:1450–1452  ·  view source on GitHub ↗

PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set.

(i ...interface{})

Source from the content-addressed store, hash-verified

1448
1449// PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set.
1450func (c *Command) PrintErr(i ...interface{}) {
1451 fmt.Fprint(c.ErrOrStderr(), i...)
1452}
1453
1454// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set.
1455func (c *Command) PrintErrln(i ...interface{}) {

Callers 4

PrintErrlnMethod · 0.95
PrintErrfMethod · 0.95

Calls 1

ErrOrStderrMethod · 0.95

Tested by 2