aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2024-03-28 22:34:02 +0200
committerGravatar GitHub <noreply@github.com> 2024-03-28 21:34:02 +0100
commit9c3915b1fcac9e5c28f3d1a333fd4347625c37ab (patch)
treecf9b8cf3a3984b45f3dc50f6d826da13da0e55a7
parentrefactor: rename error local variables (#1738) (diff)
downloadfasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.tar.gz
fasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.tar.bz2
fasthttp-9c3915b1fcac9e5c28f3d1a333fd4347625c37ab.zip
test: remove redundant error check (#1741)
-rw-r--r--.golangci.yml5
-rw-r--r--server_test.go4
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):