fix comment

This commit is contained in:
63isOK 2019-07-31 08:58:24 +00:00
parent 1c9c46d5c1
commit 22cf1631ac

View file

@ -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