More linter fixes

This commit is contained in:
Kovid Goyal
2023-09-24 09:16:27 +05:30
parent 4af1a38507
commit 38be3e98a1
5 changed files with 33 additions and 28 deletions

View File

@@ -71,7 +71,9 @@ func TestGraphicsCommandSerialization(t *testing.T) {
b.Write(decoded)
r, _ := zlib.NewReader(&b)
o := bytes.Buffer{}
io.Copy(&o, r)
if _, err = io.Copy(&o, r); err != nil {
t.Fatal(err)
}
r.Close()
decoded = o.Bytes()
}
@@ -93,7 +95,7 @@ func TestGraphicsCommandSerialization(t *testing.T) {
test_chunked_payload([]byte("abcd"))
data := make([]byte, 8111)
rand.Read(data)
_, _ = rand.Read(data)
test_chunked_payload(data)
test_chunked_payload([]byte(strings.Repeat("a", 8007)))