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

@ -196,7 +196,7 @@ func isEmpty(path string) (bool, error) {
if err != nil {
return false, err
}
list, err := f.Readdir(-1)
list, _ := f.Readdir(-1)
// f.Close() - see bug fix above
return len(list) == 0, nil
}

View File

@ -24,7 +24,7 @@ import (
var cfgFile string
var userLicense string
// This represents the base command when called without any subcommands
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "cobra",
Short: "A generator for Cobra based Applications",