diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2023-04-28 18:39:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 17:39:58 +0200 |
commit | 1dcf56222d6253715f3d637a7506d2c31981b5c8 (patch) | |
tree | e3acab7c9053a76519de5321c3407162f499dfa5 /http_test.go | |
parent | examples/client: fix error (#1545) (diff) | |
download | fasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.tar.gz fasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.tar.bz2 fasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.zip |
Diffstat (limited to 'http_test.go')
-rw-r--r-- | http_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/http_test.go b/http_test.go index e0256b4..ef4faac 100644 --- a/http_test.go +++ b/http_test.go @@ -1368,7 +1368,7 @@ func TestResponseGzipStream(t *testing.T) { fmt.Fprintf(w, "foo") w.Flush() time.Sleep(time.Millisecond) - _, _ = w.Write([]byte("barbaz")) + _, _ = w.WriteString("barbaz") _ = w.Flush() time.Sleep(time.Millisecond) _, _ = fmt.Fprintf(w, "1234") @@ -1390,11 +1390,11 @@ func TestResponseDeflateStream(t *testing.T) { t.Fatalf("IsBodyStream must return false") } r.SetBodyStreamWriter(func(w *bufio.Writer) { - _, _ = w.Write([]byte("foo")) + _, _ = w.WriteString("foo") _ = w.Flush() _, _ = fmt.Fprintf(w, "barbaz") _ = w.Flush() - _, _ = w.Write([]byte("1234")) + _, _ = w.WriteString("1234") if err := w.Flush(); err != nil { t.Fatalf("unexpected error: %v", err) } |