aboutsummaryrefslogtreecommitdiff
path: root/header_test.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-08-29 21:08:37 +0300
committerGravatar GitHub <noreply@github.com> 2023-08-29 20:08:37 +0200
commit9aa666e8145d44ee249ce281d895bf20dc82f129 (patch)
treec9fdd69bd367276e67935c41d7dd1d46f2d62b1b /header_test.go
parentUpdate golangci-lint and gosec (#1609) (diff)
downloadfasthttp-9aa666e8145d44ee249ce281d895bf20dc82f129.tar.gz
fasthttp-9aa666e8145d44ee249ce281d895bf20dc82f129.tar.bz2
fasthttp-9aa666e8145d44ee249ce281d895bf20dc82f129.zip
Enable gocritic linter; fix lint issues (#1612)
Diffstat (limited to 'header_test.go')
-rw-r--r--header_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/header_test.go b/header_test.go
index 7ae6138..67ea9fa 100644
--- a/header_test.go
+++ b/header_test.go
@@ -1977,8 +1977,7 @@ func TestResponseHeaderCookieIssue4(t *testing.T) {
}
cookieSeen := false
h.VisitAll(func(key, _ []byte) {
- switch string(key) {
- case HeaderSetCookie:
+ if string(key) == HeaderSetCookie {
cookieSeen = true
}
})
@@ -1998,8 +1997,7 @@ func TestResponseHeaderCookieIssue4(t *testing.T) {
}
cookieSeen = false
h.VisitAll(func(key, _ []byte) {
- switch string(key) {
- case HeaderSetCookie:
+ if string(key) == HeaderSetCookie {
cookieSeen = true
}
})
@@ -2022,8 +2020,7 @@ func TestRequestHeaderCookieIssue313(t *testing.T) {
}
cookieSeen := false
h.VisitAll(func(key, _ []byte) {
- switch string(key) {
- case HeaderCookie:
+ if string(key) == HeaderCookie {
cookieSeen = true
}
})
@@ -2040,8 +2037,7 @@ func TestRequestHeaderCookieIssue313(t *testing.T) {
}
cookieSeen = false
h.VisitAll(func(key, _ []byte) {
- switch string(key) {
- case HeaderCookie:
+ if string(key) == HeaderCookie {
cookieSeen = true
}
})