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

@@ -66,7 +66,7 @@ func processEnvFileLine(line []byte, filePath string,
// from the environment.
value = os.Getenv(key)
}
return
return key, value, err
}
// addFromEnvFile processes an env file allows a generic addTo to handle the

View File

@@ -42,7 +42,7 @@ func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error) {
}
// HashObject encodes object using given codec and returns MD5 sum of the result.
func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) {
func HashObject(obj runtime.Object, codec runtime.Encoder) (string, error) {
data, err := runtime.Encode(codec, obj)
if err != nil {
return "", err