Skip to content
Myr

Fix deprecation comment for Command.SetOutput (#2172)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Deprecation comments should be at the start of a paragraph [1], and because of that have a whitespace above them [2]; > To signal that an identifier should not be used, add a paragraph to its > doc comment that begins with Deprecated: followed by some information > about the deprecation (...) With the whitespace missing, some tools, including pkg.go.dev [3] don't detect it to be deprecated. [1]: https://go.dev/wiki/Deprecated [2]: https://go.dev/doc/comment#paragraphs [3]: https://pkg.go.dev/github.com/spf13/cobra@v1.8.1#Command.SetOutput

authored by Sebastiaan van Stijn · committed by GitHub · parent e94f6d0 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:command.go+1 added
279 unmodified lines
280}281282// SetOutput sets the destination for usage and error messages.283// If output is nil, os.Stderr is used.284//285// Deprecated: Use SetOut and/or SetErr instead286func (c *Command) SetOutput(output io.Writer) {287 c.outWriter = output288 c.errWriter = output
1609 unmodified lines