Enable golint (#1623)

* Enable golint in golangci-lint tests.
* Fix up minor linting issues.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2020-02-27 11:59:02 +01:00 committed by GitHub
parent ef7c05816a
commit a7c31ff7ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,10 @@
run: run:
modules-download-mode: vendor modules-download-mode: vendor
linters:
enable:
- golint
issues: issues:
exclude-rules: exclude-rules:
- path: _test.go - path: _test.go

View file

@ -213,13 +213,13 @@ func TestConfigReloading(t *testing.T) {
err := TestClientConnection() err := TestClientConnection()
if err == nil { if err == nil {
recordConnectionError(errors.New("Connection accepted but should have failed.")) recordConnectionError(errors.New("connection accepted but should have failed"))
} else { } else {
swapFileContents(goodYAMLPath, badYAMLPath) swapFileContents(goodYAMLPath, badYAMLPath)
defer swapFileContents(goodYAMLPath, badYAMLPath) defer swapFileContents(goodYAMLPath, badYAMLPath)
err = TestClientConnection() err = TestClientConnection()
if err != nil { if err != nil {
recordConnectionError(errors.New("Connection failed but should have been accepted.")) recordConnectionError(errors.New("connection failed but should have been accepted"))
} else { } else {
recordConnectionError(nil) recordConnectionError(nil)