diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-16 15:38:01 +0100 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-16 18:09:28 +0100 |
commit | 32793db72d04141d333eb04ce60170db6e79e6d2 (patch) | |
tree | 69735778f01c65ea864e696bec9fa08e83d85378 /header_test.go | |
parent | Add Client.MaxConnDuration (diff) | |
download | fasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.tar.gz fasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.tar.bz2 fasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.zip |
Run golangci-lint using a Github Action
Diffstat (limited to 'header_test.go')
-rw-r--r-- | header_test.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/header_test.go b/header_test.go index 7819e44..2f1a564 100644 --- a/header_test.go +++ b/header_test.go @@ -1144,8 +1144,8 @@ func TestResponseHeaderCopyTo(t *testing.T) { h.bufKV = argsKV{} h1.bufKV = argsKV{} - if !reflect.DeepEqual(h, h1) { - t.Fatalf("ResponseHeaderCopyTo fail, src: \n%+v\ndst: \n%+v\n", h, h1) + if !reflect.DeepEqual(h, h1) { //nolint:govet + t.Fatalf("ResponseHeaderCopyTo fail, src: \n%+v\ndst: \n%+v\n", h, h1) //nolint:govet } } @@ -1178,8 +1178,8 @@ func TestRequestHeaderCopyTo(t *testing.T) { h.bufKV = argsKV{} h1.bufKV = argsKV{} - if !reflect.DeepEqual(h, h1) { - t.Fatalf("RequestHeaderCopyTo fail, src: \n%+v\ndst: \n%+v\n", h, h1) + if !reflect.DeepEqual(h, h1) { //nolint:govet + t.Fatalf("RequestHeaderCopyTo fail, src: \n%+v\ndst: \n%+v\n", h, h1) //nolint:govet } } @@ -1193,8 +1193,8 @@ func TestResponseContentTypeNoDefaultNotEmpty(t *testing.T) { headers := h.String() - if strings.Index(headers, "Content-Type: \r\n") != -1 { - t.Fatalf("ResponseContentTypeNoDefaultNotEmpty fail, response: \n%+v\noutcome: \n%q\n", h, headers) + if strings.Contains(headers, "Content-Type: \r\n") { + t.Fatalf("ResponseContentTypeNoDefaultNotEmpty fail, response: \n%+v\noutcome: \n%q\n", h, headers) //nolint:govet } } @@ -1477,7 +1477,9 @@ func TestResponseHeaderCookie(t *testing.T) { h.VisitAllCookie(func(key, value []byte) { var cc Cookie - cc.ParseBytes(value) + if err := cc.ParseBytes(value); err != nil { + t.Fatal(err) + } if !bytes.Equal(key, cc.Key()) { t.Fatalf("Unexpected cookie key %q. Expected %q", key, cc.Key()) } |