Edit ResetFlags and ResetCommands descriptions

This commit is contained in:
Albert Nigmatzianov
2017-11-02 14:27:24 +01:00
parent 65c8acb228
commit d6a430541c
2 changed files with 31 additions and 48 deletions

View File

@ -875,7 +875,7 @@ Simply type ` + c.Name() + ` help [path to command] for full details.`,
c.AddCommand(c.helpCommand)
}
// ResetCommands used for testing.
// ResetCommands delete parent, subcommand and help command from c.
func (c *Command) ResetCommands() {
c.parent = nil
c.commands = nil
@ -1271,7 +1271,7 @@ func (c *Command) PersistentFlags() *flag.FlagSet {
return c.pflags
}
// ResetFlags is used in testing.
// ResetFlags deletes all flags from command.
func (c *Command) ResetFlags() {
c.flagErrorBuf = new(bytes.Buffer)
c.flagErrorBuf.Reset()