Fixing golint warnings

* Moving final return outside of if-else
* Removing type declarations that Go can infer from values
* Cleaning up some existing comments
* Changing snake_case variables to camelCase
This commit is contained in:
Ian Walter
2016-03-31 09:53:34 -04:00
parent c678ff029e
commit a0bd6c17b3
8 changed files with 40 additions and 48 deletions

View File

@ -25,7 +25,7 @@ func check(t *testing.T, found, expected string) {
// World worst custom function, just keep telling you to enter hello!
const (
bash_completion_func = `__custom_func() {
bashCompletionFunc = `__custom_func() {
COMPREPLY=( "hello" )
}
`
@ -37,7 +37,7 @@ func TestBashCompletions(t *testing.T) {
c.AddCommand(cmdEcho, cmdPrint, cmdDeprecated, cmdColon)
// custom completion function
c.BashCompletionFunction = bash_completion_func
c.BashCompletionFunction = bashCompletionFunc
// required flag
c.MarkFlagRequired("introot")