From cbe4998e2951c1c1b29dcd75059987ba818990d0 Mon Sep 17 00:00:00 2001 From: roeldev Date: Sun, 11 Feb 2024 20:21:25 +0100 Subject: [PATCH] Update tests, explicit ignore WriteString return values --- bytes_test.go | 2 +- string_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bytes_test.go b/bytes_test.go index fd4f478..e6449a9 100644 --- a/bytes_test.go +++ b/bytes_test.go @@ -28,7 +28,7 @@ func TestBytesBufferPool_Get(t *testing.T) { assert.Equal(t, 0, b.Cap()) const str = "dit is een hele lang test string met heel veel willekeurige woorden die nergens op slaan zolang de buffer maar groeit" - b.WriteString(str) + _, _ = b.WriteString(str) assert.Equal(t, str, b.String()) p.Put(b) diff --git a/string_test.go b/string_test.go index 505af5b..368c3c9 100644 --- a/string_test.go +++ b/string_test.go @@ -19,7 +19,7 @@ func TestToStringWriter(t *testing.T) { var writer writerOnly sw := ToStringWriter(&writer) assert.NotSame(t, &writer, sw) - sw.WriteString("test") + _, _ = sw.WriteString("test") assert.Equal(t, "test", string(writer.buf)) }) }