diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2024-03-28 22:34:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 21:34:02 +0100 |
commit | 9c3915b1fcac9e5c28f3d1a333fd4347625c37ab (patch) | |
tree | cf9b8cf3a3984b45f3dc50f6d826da13da0e55a7 | |
parent | refactor: rename error local variables (#1738) (diff) | |
download | fasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.tar.gz fasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.tar.bz2 fasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.zip |
test: remove redundant error check (#1741)
-rw-r--r-- | .golangci.yml | 5 | ||||
-rw-r--r-- | server_test.go | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.golangci.yml b/.golangci.yml index dded8fc..fa85f7a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -80,6 +80,11 @@ linters-settings: - sloppyReassign - unnamedResult - whyNoLint + govet: + enable-all: true + disable: + - fieldalignment + - shadow issues: # Show all issues from a linter. diff --git a/server_test.go b/server_test.go index 2153c89..c17c89f 100644 --- a/server_test.go +++ b/server_test.go @@ -4146,7 +4146,7 @@ func TestMaxReadTimeoutPerRequest(t *testing.T) { select { case err := <-ch: - if err == nil || err != nil && !strings.EqualFold(err.Error(), "timeout") { + if err == nil || !strings.EqualFold(err.Error(), "timeout") { t.Fatalf("Unexpected error from serveConn: %v", err) } case <-time.After(time.Second): @@ -4206,7 +4206,7 @@ func TestMaxWriteTimeoutPerRequest(t *testing.T) { select { case err := <-ch: - if err == nil || err != nil && !strings.EqualFold(err.Error(), "timeout") { + if err == nil || !strings.EqualFold(err.Error(), "timeout") { t.Fatalf("Unexpected error from serveConn: %v", err) } case <-time.After(time.Second): |