diff --git a/cmd/common.go b/cmd/common.go index c552f86010f75ddaa57c64a6786c64767adef42d..608195ce21fb44af0f0f78e1b859994b51f96889 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -107,7 +107,7 @@ func runChecks(t check.NodeType) { fmt.Println(string(out)) } else { // if we want to store in PostgreSQL, convert to JSON and save it - if (summary.Fail > 0 || summary.Warn > 0 || summary.Pass > 0) && pgSql { + if (summary.Fail > 0 || summary.Warn > 0 || summary.Pass > 0) && pgSQL { out, err := controls.JSON() if err != nil { exitWithError(fmt.Errorf("failed to output in JSON format: %v", err)) diff --git a/cmd/database.go b/cmd/database.go index 46668ae2a8e598ae4d54cff2c951e52c513efa18..dbbbb94b8c11cefda065ce7fd78c413df4a61765 100644 --- a/cmd/database.go +++ b/cmd/database.go @@ -7,7 +7,7 @@ import ( "github.com/golang/glog" "github.com/jinzhu/gorm" - _ "github.com/jinzhu/gorm/dialects/postgres" + _ "github.com/jinzhu/gorm/dialects/postgres" // database packages get blank imports "github.com/spf13/viper" ) diff --git a/cmd/root.go b/cmd/root.go index 3c80f5d5941170805098a0eafde266edd685ef00..76d871a5e54f22cb08523dd4cf95e68cb31311cd 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -30,7 +30,7 @@ var ( defaultKubeVersion = "1.6" cfgFile string jsonFmt bool - pgSql bool + pgSQL bool checkList string groupList string masterFile string @@ -61,7 +61,7 @@ func init() { cobra.OnInitialize(initConfig) RootCmd.PersistentFlags().BoolVar(&jsonFmt, "json", false, "Prints the results as JSON") - RootCmd.PersistentFlags().BoolVar(&pgSql, "pgsql", false, "Save the results to PostgreSQL") + RootCmd.PersistentFlags().BoolVar(&pgSQL, "pgsql", false, "Save the results to PostgreSQL") RootCmd.PersistentFlags().StringVarP( &checkList, "check", diff --git a/cmd/util.go b/cmd/util.go index f2c6b2926ff55f8ef537b04bf562053b6b8e3315..d1c14fdfb87206fdb3b4c333f63f4e55c14d10ed 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -196,9 +196,8 @@ func findExecutable(candidates []string) (string, error) { for _, c := range candidates { if verifyBin(c) { return c, nil - } else { - glog.V(1).Info(fmt.Sprintf("executable '%s' not running", c)) } + glog.V(1).Info(fmt.Sprintf("executable '%s' not running", c)) } return "", fmt.Errorf("no candidates running")