Add gometalinter to pre-commit hook

Enable varcheck and fix found issues

Add ineffassign to list of checks and fix found issues

Added nakedret and fixed found issues

Add interfacer check and fix found issue

Add lll and fix found issues

Add deadcode linter, remove unused code
This commit is contained in:
Oleg Atamanenko
2018-06-14 15:38:32 -04:00
parent 8127b09d12
commit 6fd0330b80
12 changed files with 43 additions and 118 deletions

View File

@@ -39,11 +39,10 @@ func newProgram(out, errOut io.Writer) *program {
}
func (d *program) makeCommand(args ...string) exec.Cmd {
diff := ""
diff := "diff"
if envDiff := os.Getenv("KUBERNETES_EXTERNAL_DIFF"); envDiff != "" {
diff = envDiff
} else {
diff = "diff"
args = append([]string{"-u", "-N"}, args...)
}
cmd := exec.New().Command(diff, args...)