Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some golint errors #988

Merged
merged 3 commits into from
Dec 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions category.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cli

// CommandCategories interface allows for category manipulation
type CommandCategories interface {
// AddCommand adds a command to a category, creating a new category if necessary.
AddCommand(category string, command *Command)
1 change: 1 addition & 0 deletions errors.go
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ func (m *multiError) Errors() []error {
return errs
}

// ErrorFormatter is the interface that will suitably format the error output
type ErrorFormatter interface {
Format(s fmt.State, verb rune)
}
2 changes: 1 addition & 1 deletion flag_path.go
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ func (f *PathFlag) Apply(set *flag.FlagSet) error {
return nil
}

// String looks up the value of a local PathFlag, returns
// Path looks up the value of a local PathFlag, returns
// "" if not found
func (c *Context) Path(name string) string {
if fs := lookupFlagSet(name, c); fs != nil {
2 changes: 1 addition & 1 deletion help.go
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@ func printFlagSuggestions(lastArg string, flags []Flag, writer io.Writer) {
if bflag, ok := flag.(*BoolFlag); ok && bflag.Hidden {
continue
}
for _, name := range flag.Names(){
for _, name := range flag.Names() {
name = strings.TrimSpace(name)
// this will get total count utf8 letters in flag name
count := utf8.RuneCountInString(name)