Cleaned up exported func comments per golint

This commit is contained in:
Matt Farina
2016-05-09 10:12:59 -04:00
parent 2f4ec31264
commit 2f110bd745
8 changed files with 103 additions and 63 deletions

View File

@@ -1,7 +1,9 @@
package cli
// CommandCategories is a slice of *CommandCategory.
type CommandCategories []*CommandCategory
// CommandCategory is a category containing commands.
type CommandCategory struct {
Name string
Commands Commands
@@ -19,6 +21,7 @@ func (c CommandCategories) Swap(i, j int) {
c[i], c[j] = c[j], c[i]
}
// AddCommand adds a command to a category.
func (c CommandCategories) AddCommand(category string, command Command) CommandCategories {
for _, commandCategory := range c {
if commandCategory.Name == category {