From d4bfc3f6b5d433ffc4314e3562eedd0342074f0c Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Thu, 6 May 2021 22:06:22 +0200 Subject: [PATCH] fix lint configuration and a warning --- .golangci.yml | 8 +++++--- httpd/httpd_test.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 350a19ac..d86ce9bc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,8 +19,11 @@ linters-settings: simplify: true goimports: local-prefixes: github.com/drakkan/sftpgo - maligned: - suggest-new: true + #govet: + # report about shadowed variables + #check-shadowing: true + #enable: + # - fieldalignment linters: enable: @@ -34,7 +37,6 @@ linters: - bodyclose - gocyclo - misspell - - maligned - whitespace - dupl - rowserrcheck diff --git a/httpd/httpd_test.go b/httpd/httpd_test.go index 73ec9c63..e29418e6 100644 --- a/httpd/httpd_test.go +++ b/httpd/httpd_test.go @@ -4828,7 +4828,7 @@ func TestWebClientChangePubKeys(t *testing.T) { checkResponseCode(t, http.StatusOK, rr) assert.Contains(t, rr.Body.String(), "Your public keys has been successfully updated") - user, _, err = httpdtest.GetUserByUsername(defaultUsername, http.StatusOK) + user, _, err = httpdtest.GetUserByUsername(user.Username, http.StatusOK) assert.NoError(t, err) assert.Len(t, user.PublicKeys, 1)