aboutsummaryrefslogtreecommitdiff
path: root/http_test.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2023-02-11 09:35:15 +0200
committerGravatar GitHub <noreply@github.com> 2023-02-11 15:35:15 +0800
commit934f04e33096b7884d96135d44f2879a82e54a94 (patch)
tree98cd897d8d434aee3c5a95046f9f02ebfcb3721d /http_test.go
parentRename unexported funcs, vars to match common Go (#1488) (diff)
downloadfasthttp-934f04e33096b7884d96135d44f2879a82e54a94.tar.gz
fasthttp-934f04e33096b7884d96135d44f2879a82e54a94.tar.bz2
fasthttp-934f04e33096b7884d96135d44f2879a82e54a94.zip
Refactor golangci-lint config and remove redundant nolints (#1486)
* Refactor golangci-lint config - Use golangci-lint-action for GitHub workflow. - Add additional golangci-lint run options. - Remove unused nolint directives. * Revert exclude-use-default option
Diffstat (limited to 'http_test.go')
-rw-r--r--http_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/http_test.go b/http_test.go
index 0cc1fef..a0bf6ff 100644
--- a/http_test.go
+++ b/http_test.go
@@ -1370,10 +1370,10 @@ func TestResponseGzipStream(t *testing.T) {
fmt.Fprintf(w, "foo")
w.Flush()
time.Sleep(time.Millisecond)
- w.Write([]byte("barbaz")) //nolint:errcheck
- w.Flush() //nolint:errcheck
+ _, _ = w.Write([]byte("barbaz"))
+ _ = w.Flush()
time.Sleep(time.Millisecond)
- fmt.Fprintf(w, "1234") //nolint:errcheck
+ _, _ = fmt.Fprintf(w, "1234")
if err := w.Flush(); err != nil {
t.Fatalf("unexpected error: %v", err)
}
@@ -1392,11 +1392,11 @@ func TestResponseDeflateStream(t *testing.T) {
t.Fatalf("IsBodyStream must return false")
}
r.SetBodyStreamWriter(func(w *bufio.Writer) {
- w.Write([]byte("foo")) //nolint:errcheck
- w.Flush() //nolint:errcheck
- fmt.Fprintf(w, "barbaz") //nolint:errcheck
- w.Flush() //nolint:errcheck
- w.Write([]byte("1234")) //nolint:errcheck
+ _, _ = w.Write([]byte("foo"))
+ _ = w.Flush()
+ _, _ = fmt.Fprintf(w, "barbaz")
+ _ = w.Flush()
+ _, _ = w.Write([]byte("1234"))
if err := w.Flush(); err != nil {
t.Fatalf("unexpected error: %v", err)
}