aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-05 20:59:49 +0800
committerGravatar Runxi Yu2026-03-05 21:03:08 +0800
commit8bd9c519f3da004d3686b1d61bf8d261f021df0c (patch)
treee2d0e4bbee215532789f24e629e9031858f36c5b /internal
parent*: Fix lint wsl_v5 (diff)
signatureNo signature
*: Fix lints
Diffstat (limited to 'internal')
-rw-r--r--internal/compress/zlib/reader_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/compress/zlib/reader_test.go b/internal/compress/zlib/reader_test.go
index 9b534b1e..e8a44007 100644
--- a/internal/compress/zlib/reader_test.go
+++ b/internal/compress/zlib/reader_test.go
@@ -182,11 +182,13 @@ func TestDecompressor(t *testing.T) {
}
// Check for sticky errors.
- if n, err := zr.Read([]byte{0}); n != 0 || !errors.Is(err, io.EOF) {
+ n1, err := zr.Read([]byte{0})
+ if n1 != 0 || !errors.Is(err, io.EOF) {
t.Errorf("%s: Read() = (%d, %v), want (0, io.EOF)", tt.desc, n, err)
}
- if err := zr.Close(); err != nil {
+ err = zr.Close()
+ if err != nil {
t.Errorf("%s: Close() = %v, want nil", tt.desc, err)
}
}