mirror of
https://github.com/spf13/cobra
synced 2025-05-06 13:27:26 +00:00
fix comment
This commit is contained in:
parent
1c9c46d5c1
commit
22cf1631ac
1 changed files with 3 additions and 2 deletions
|
@ -228,7 +228,7 @@ func (c *Command) SetErr(newErr io.Writer) {
|
||||||
c.errWriter = newErr
|
c.errWriter = newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetOut sets the source for input data
|
// SetIn sets the source for input data
|
||||||
// If newIn is nil, os.Stdin is used.
|
// If newIn is nil, os.Stdin is used.
|
||||||
func (c *Command) SetIn(newIn io.Reader) {
|
func (c *Command) SetIn(newIn io.Reader) {
|
||||||
c.inReader = newIn
|
c.inReader = newIn
|
||||||
|
@ -297,7 +297,7 @@ func (c *Command) ErrOrStderr() io.Writer {
|
||||||
return c.getErr(os.Stderr)
|
return c.getErr(os.Stderr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrOrStderr returns output to stderr
|
// InOrStdin returns input to stdin
|
||||||
func (c *Command) InOrStdin() io.Reader {
|
func (c *Command) InOrStdin() io.Reader {
|
||||||
return c.getIn(os.Stdin)
|
return c.getIn(os.Stdin)
|
||||||
}
|
}
|
||||||
|
@ -935,6 +935,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
||||||
return cmd, err
|
return cmd, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidateArgs validate args
|
||||||
func (c *Command) ValidateArgs(args []string) error {
|
func (c *Command) ValidateArgs(args []string) error {
|
||||||
if c.Args == nil {
|
if c.Args == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue