From f2922155de01b734e3e8b3f50be8f263ec13cacd Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 6 Mar 2026 18:38:44 +0800 Subject: *: Lint --- internal/compress/zlib/reader.go | 1 + internal/compress/zlib/reader_test.go | 1 + internal/compress/zlib/writer.go | 1 + internal/compress/zlib/writer_test.go | 2 ++ 4 files changed, 5 insertions(+) (limited to 'internal/compress') diff --git a/internal/compress/zlib/reader.go b/internal/compress/zlib/reader.go index 3cf0066e..1f6d4337 100644 --- a/internal/compress/zlib/reader.go +++ b/internal/compress/zlib/reader.go @@ -58,6 +58,7 @@ var ( ErrHeader = errors.New("zlib: invalid header") ) +//nolint:gochecknoglobals var readerPool = sync.Pool{ New: func() any { r := new(Reader) diff --git a/internal/compress/zlib/reader_test.go b/internal/compress/zlib/reader_test.go index c64bd5b0..2cfa8a97 100644 --- a/internal/compress/zlib/reader_test.go +++ b/internal/compress/zlib/reader_test.go @@ -24,6 +24,7 @@ type zlibTest struct { // Compare-to-golden test data was generated by the ZLIB example program at // https://www.zlib.net/zpipe.c +//nolint:gochecknoglobals var zlibTests = []zlibTest{ { "truncated empty", diff --git a/internal/compress/zlib/writer.go b/internal/compress/zlib/writer.go index 8a5562fb..05808eb6 100644 --- a/internal/compress/zlib/writer.go +++ b/internal/compress/zlib/writer.go @@ -37,6 +37,7 @@ type Writer struct { wroteHeader bool } +//nolint:gochecknoglobals var writerPool = sync.Pool{ New: func() any { return new(Writer) diff --git a/internal/compress/zlib/writer_test.go b/internal/compress/zlib/writer_test.go index e67a3539..541aac65 100644 --- a/internal/compress/zlib/writer_test.go +++ b/internal/compress/zlib/writer_test.go @@ -15,12 +15,14 @@ import ( "codeberg.org/lindenii/furgit/internal/compress/zlib" ) +//nolint:gochecknoglobals var filenames = []string{ "../testdata/gettysburg.txt", "../testdata/e.txt", "../testdata/pi.txt", } +//nolint:gochecknoglobals var data = []string{ "test a reasonable sized string that can be compressed", } -- cgit v1.3.1-10-gc9f91