mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Fix deprecation comment for Command.SetOutput (#2172)
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 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e94f6d0dd9
commit
371ae25d2c
1 changed files with 1 additions and 0 deletions
|
@ -281,6 +281,7 @@ func (c *Command) SetArgs(a []string) {
|
||||||
|
|
||||||
// SetOutput sets the destination for usage and error messages.
|
// SetOutput sets the destination for usage and error messages.
|
||||||
// If output is nil, os.Stderr is used.
|
// If output is nil, os.Stderr is used.
|
||||||
|
//
|
||||||
// Deprecated: Use SetOut and/or SetErr instead
|
// Deprecated: Use SetOut and/or SetErr instead
|
||||||
func (c *Command) SetOutput(output io.Writer) {
|
func (c *Command) SetOutput(output io.Writer) {
|
||||||
c.outWriter = output
|
c.outWriter = output
|
||||||
|
|
Loading…
Reference in a new issue