Fix Workhorse linter warnings (part 21)
Problem
make golangci
linter detects warnings in following Workhorse files
How to verify
make golangci | grep -E "^internal/redis"
internal/redis/keywatcher.go:120:66: unnecessary conversion (unconvert)
internal/redis/keywatcher.go:129:1: exported: exported method KeyWatcher.Process should have comment or be unexported (revive)
internal/redis/keywatcher.go:150:1: exported: exported method KeyWatcher.Shutdown should have comment or be unexported (revive)
internal/redis/keywatcher.go:19:6: exported: exported type KeyWatcher should have comment or be unexported (revive)
internal/redis/keywatcher.go:1:1: package-comments: should have a package comment (revive)
internal/redis/keywatcher.go:232:23: Error return value of `kw.conn.Unsubscribe` is not checked (errcheck)
internal/redis/keywatcher.go:252:1: exported: exported method KeyWatcher.WatchKey should have comment or be unexported (revive)
internal/redis/keywatcher.go:28:1: exported: exported function NewKeyWatcher should have comment or be unexported (revive)
internal/redis/keywatcher.go:42:2: exported: exported var KeyWatchers should have comment or be unexported (revive)
internal/redis/keywatcher.go:79:86: (*KeyWatcher).receivePubSubStream - result 0 (error) is always nil (unparam)
internal/redis/keywatcher.go:90:16: Error return value of `kw.conn.Close` is not checked (errcheck)
internal/redis/keywatcher_test.go:120: unnecessary leading newline (whitespace)
internal/redis/keywatcher_test.go:31:3: require-error: for error assertions use require (testifylint)
internal/redis/redis.go:16:2: blank-imports: a blank import should be only in a main or test package, or have a comment justifying it (revive)
internal/redis/redis.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
internal/redis/redis.go:21:24: var-declaration: should omit type error from declaration of var errSentinelMasterAddr; it will be inferred from the right-hand side (revive)
internal/redis/redis.go:23:2: exported: exported var TotalConnections should have comment or be unexported (revive)
internal/redis/redis.go:95:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
internal/redis/redis_test.go:105:15: `initialise` is a misspelling of `initialize` (misspell)
internal/redis/redis_test.go:18:2: error-nil: use require.NoError (testifylint)
internal/redis/redis_test.go:23:3: error-nil: use require.NoError (testifylint)
internal/redis/redis_test.go:66:15: `initialise` is a misspelling of `initialize` (misspell)
Solution
Resolve warnings
Edited by Vasilii Iakliushin