Skip to content

Commit

Permalink
Lint all code for golint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Briggs committed Jan 11, 2018
1 parent e715226 commit 94a1f3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion cmd/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
defaultKubeVersion = "1.6"
cfgFile string
jsonFmt bool
pgSql bool
pgSQL bool
checkList string
groupList string
masterFile string
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 94a1f3c

Please sign in to comment.