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:
modules-download-mode: vendor
linters:
enable:
- golint
issues:
exclude-rules:
- path: _test.go

View File

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