From c9b91c357fba57412581232c8298d632a3614321 Mon Sep 17 00:00:00 2001 From: Albert Bausili Date: Sun, 29 Mar 2026 04:18:11 +0200 Subject: [PATCH 1/5] ci: add lint/test on PRs and publish on release - ci.yml: golangci-lint + go test -race on all PRs to main - release.yml: verify module and trigger pkg.go.dev indexing on release --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e1dc66d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.26" + - uses: golangci/golangci-lint-action@v6 + with: + version: latest + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.26" + - name: Run tests + run: go test -race -count=1 -timeout 120s ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8969dcc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + publish: + name: Publish to Go Package Registry + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.26" + - name: Verify module + run: | + go mod verify + go build ./... + go vet ./... + - name: Request pkg.go.dev indexing + run: | + TAG="${{ github.event.release.tag_name }}" + curl -s "https://proxy.golang.org/github.com/goceleris/loadgen/@v/${TAG}.info" || true + curl -s "https://sum.golang.org/lookup/github.com/goceleris/loadgen@${TAG}" || true + echo "Published github.com/goceleris/loadgen@${TAG}" From f51d08d3a7b5eac22481cb734d115d35264aba73 Mon Sep 17 00:00:00 2001 From: Albert Bausili Date: Sun, 29 Mar 2026 04:18:38 +0200 Subject: [PATCH 2/5] ci: add dependabot with grouped updates Weekly checks for Go module and GitHub Actions updates, all grouped into a single PR per ecosystem. --- .github/dependabot.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8c9069f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: / + schedule: + interval: weekly + groups: + all-go-deps: + patterns: + - "*" + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + all-actions: + patterns: + - "*" From f16ecd577e2bdde3cee38dcb936c955ba92e377f Mon Sep 17 00:00:00 2001 From: Albert Bausili Date: Sun, 29 Mar 2026 04:20:05 +0200 Subject: [PATCH 3/5] =?UTF-8?q?ci:=20fix=20lint=20=E2=80=94=20use=20golang?= =?UTF-8?q?ci-lint=20v2.9=20for=20Go=201.26=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit golangci-lint v1.x is built with Go 1.24 and cannot target Go 1.26. Switch to golangci-lint-action@v9 with v2.9, matching the celeris repo. Add .golangci.yml config (errcheck, govet, staticcheck, revive, etc.). Also bump actions/checkout and actions/setup-go to v6. --- .github/workflows/ci.yml | 12 ++++++------ .golangci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1dc66d..f72200d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,20 +14,20 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version: "1.26" - - uses: golangci/golangci-lint-action@v6 + - uses: golangci/golangci-lint-action@v9 with: - version: latest + version: v2.9 test: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version: "1.26" - name: Run tests diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..324a038 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,41 @@ +version: "2" + +run: + timeout: 5m + +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - github.com/goceleris/loadgen + +linters: + default: none + enable: + - errcheck + - govet + - staticcheck + - revive + - ineffassign + - unused + - misspell + - unconvert + - unparam + - prealloc + - nolintlint + settings: + nolintlint: + require-explanation: true + require-specific: true + exclusions: + rules: + - path: _test\.go + linters: + - unparam + - path: _test\.go + linters: + - revive + text: "dot-imports" From 7a5f30cb98fca0120d6ef8984c02d6c373789b44 Mon Sep 17 00:00:00 2001 From: Albert Bausili Date: Sun, 29 Mar 2026 04:25:09 +0200 Subject: [PATCH 4/5] fix: resolve all golangci-lint v2 issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix package comment: "Package bench" → "Package loadgen" (revive) - Rename java_like_format → javaLikeFormat (revive var-naming) - Fix gofmt alignment in Config structs across 4 files - Add _ = for unchecked Close/Write returns in tests (errcheck) - Use _ for unused http.Request and callback params in tests (revive) --- bench.go | 2 +- benchmarker_test.go | 40 +++++++++++++++---------------- checkpoint/checkpoint.go | 20 ++++++++-------- cmd/loadgen/main.go | 18 +++++++------- h1client.go | 2 +- h1client_test.go | 52 ++++++++++++++++++++-------------------- h2client_test.go | 14 +++++------ 7 files changed, 74 insertions(+), 74 deletions(-) diff --git a/bench.go b/bench.go index 3845ee6..e9b2333 100644 --- a/bench.go +++ b/bench.go @@ -1,4 +1,4 @@ -// Package bench provides a high-performance HTTP benchmarking tool. +// Package loadgen provides a high-performance HTTP benchmarking tool. package loadgen import ( diff --git a/benchmarker_test.go b/benchmarker_test.go index 4df36ea..b56b22f 100644 --- a/benchmarker_test.go +++ b/benchmarker_test.go @@ -15,9 +15,9 @@ import ( ) func TestBenchmarkerSuccess(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -55,9 +55,9 @@ func TestBenchmarkerSuccess(t *testing.T) { } func TestBenchmarkerWarmup(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -96,9 +96,9 @@ func TestBenchmarkerWarmup(t *testing.T) { } func TestBenchmarkerContextCancellation(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -141,9 +141,9 @@ func TestBenchmarkerContextCancellation(t *testing.T) { } func TestBenchmarkerErrors(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(500) - w.Write([]byte("Internal Server Error")) + _, _ = w.Write([]byte("Internal Server Error")) })) defer srv.Close() @@ -172,9 +172,9 @@ func TestBenchmarkerErrors(t *testing.T) { } func TestBenchmarkerTimeseries(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -207,9 +207,9 @@ func TestBenchmarkerTimeseries(t *testing.T) { } func TestBenchmarkerOnProgress(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -222,7 +222,7 @@ func TestBenchmarkerOnProgress(t *testing.T) { Connections: 4, Workers: 4, Warmup: 0, - OnProgress: func(elapsed time.Duration, snapshot Result) { + OnProgress: func(_ time.Duration, _ Result) { progressCalls.Add(1) }, } @@ -244,9 +244,9 @@ func TestBenchmarkerOnProgress(t *testing.T) { } func TestBenchmarkerMaxRPS(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) })) defer srv.Close() @@ -284,7 +284,7 @@ type mockClient struct { calls atomic.Int64 } -func (m *mockClient) DoRequest(ctx context.Context, workerID int) (int, error) { +func (m *mockClient) DoRequest(_ context.Context, _ int) (int, error) { m.calls.Add(1) // Simulate a tiny bit of work time.Sleep(100 * time.Microsecond) @@ -346,10 +346,10 @@ func TestBenchmarkerValidation(t *testing.T) { } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { + t.Run(tt.name, func(st *testing.T) { _, err := New(tt.cfg) if err == nil { - t.Errorf("expected error for %s config", tt.name) + st.Errorf("expected error for %s config", tt.name) } }) } @@ -358,9 +358,9 @@ func TestBenchmarkerValidation(t *testing.T) { func TestBenchmarkerH2(t *testing.T) { // Start an h2c server mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) }) h2s := &http2.Server{} diff --git a/checkpoint/checkpoint.go b/checkpoint/checkpoint.go index d18ab1d..5edaa8d 100644 --- a/checkpoint/checkpoint.go +++ b/checkpoint/checkpoint.go @@ -34,12 +34,12 @@ type BenchmarkConfig struct { // SystemMetrics holds server-side and client-side resource metrics. type SystemMetrics struct { - ServerCPUPercent float64 `json:"server_cpu_percent,omitempty"` - ServerCPUUserPercent float64 `json:"server_cpu_user_percent,omitempty"` - ServerCPUSysPercent float64 `json:"server_cpu_sys_percent,omitempty"` - ServerMemoryRSSMB float64 `json:"server_memory_rss_mb,omitempty"` - ClientCPUPercent float64 `json:"client_cpu_percent,omitempty"` - GCPauses *GCPauseStats `json:"server_gc,omitempty"` + ServerCPUPercent float64 `json:"server_cpu_percent,omitempty"` + ServerCPUUserPercent float64 `json:"server_cpu_user_percent,omitempty"` + ServerCPUSysPercent float64 `json:"server_cpu_sys_percent,omitempty"` + ServerMemoryRSSMB float64 `json:"server_memory_rss_mb,omitempty"` + ClientCPUPercent float64 `json:"client_cpu_percent,omitempty"` + GCPauses *GCPauseStats `json:"server_gc,omitempty"` Timeseries []loadgen.TimeseriesPoint `json:"timeseries,omitempty"` } @@ -216,14 +216,14 @@ func formatBytes(b float64) string { func formatFloat(f float64) string { if f >= 100 { - return java_like_format(f, 0) + return javaLikeFormat(f, 0) } else if f >= 10 { - return java_like_format(f, 1) + return javaLikeFormat(f, 1) } - return java_like_format(f, 2) + return javaLikeFormat(f, 2) } -func java_like_format(f float64, precision int) string { +func javaLikeFormat(f float64, precision int) string { format := "%." + string('0'+byte(precision)) + "f" return sprintf(format, f) } diff --git a/cmd/loadgen/main.go b/cmd/loadgen/main.go index 30b5b61..1ae5971 100644 --- a/cmd/loadgen/main.go +++ b/cmd/loadgen/main.go @@ -93,15 +93,15 @@ func main() { } cfg := loadgen.Config{ - URL: *url, - Method: *method, - Body: body, - Duration: *duration, - Warmup: *warmup, - Connections: *connections, - Workers: w, - DisableKeepAlive: *connClose, - HTTP2: *h2, + URL: *url, + Method: *method, + Body: body, + Duration: *duration, + Warmup: *warmup, + Connections: *connections, + Workers: w, + DisableKeepAlive: *connClose, + HTTP2: *h2, HTTP2Options: loadgen.HTTP2Options{ Connections: *h2Conns, MaxStreams: *h2Streams, diff --git a/h1client.go b/h1client.go index aad3959..1c2becf 100644 --- a/h1client.go +++ b/h1client.go @@ -18,7 +18,7 @@ import ( // matches wrk's behavior of having many in-flight reconnects per thread. type h1Client struct { conns []*h1Conn - connCounters []int // per-worker round-robin counter (no sync needed) + connCounters []int // per-worker round-robin counter (no sync needed) addr string reqBuf []byte // pre-formatted request bytes (immutable) keepAlive bool diff --git a/h1client_test.go b/h1client_test.go index 1d6ba1a..6463ba2 100644 --- a/h1client_test.go +++ b/h1client_test.go @@ -34,7 +34,7 @@ func startH1Server(t *testing.T, handler func(conn net.Conn)) (host, port string } }() h, p, _ := net.SplitHostPort(ln.Addr().String()) - return h, p, func() { ln.Close(); <-done } + return h, p, func() { _ = ln.Close(); <-done } } // readH1Request reads a full HTTP/1.1 request (request line + headers + optional body). @@ -54,15 +54,15 @@ func readH1Request(r *bufio.Reader) bool { // testH1Cfg builds a Config suitable for newH1Client in tests. func testH1Cfg(keepAlive bool, workers int) Config { cfg := Config{ - Method: "GET", + Method: "GET", DisableKeepAlive: !keepAlive, - Workers: workers, - Connections: workers, - DialTimeout: 5 * time.Second, - ReadBufferSize: 256 * 1024, - WriteBufferSize: 256 * 1024, - MaxResponseSize: 10 << 20, // 10MB - PoolSize: 16, + Workers: workers, + Connections: workers, + DialTimeout: 5 * time.Second, + ReadBufferSize: 256 * 1024, + WriteBufferSize: 256 * 1024, + MaxResponseSize: 10 << 20, // 10MB + PoolSize: 16, } return cfg } @@ -73,7 +73,7 @@ func TestH1KeepAlive(t *testing.T) { var mu sync.Mutex host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() mu.Lock() connCount++ mu.Unlock() @@ -117,13 +117,13 @@ func TestH1KeepAlive(t *testing.T) { func TestH1ConnectionClose(t *testing.T) { host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) if !readH1Request(reader) { return } resp := "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 2\r\n\r\nOK" - conn.Write([]byte(resp)) + _, _ = conn.Write([]byte(resp)) // Server closes after one response (Connection: close) }) defer cleanup() @@ -151,7 +151,7 @@ func TestH1ConnectionClose(t *testing.T) { func TestH1ContentLength(t *testing.T) { body := "Hello, World! This is a test response body." host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { @@ -183,7 +183,7 @@ func TestH1ContentLength(t *testing.T) { func TestH1Chunked(t *testing.T) { // The chunks: "Hello" (5 bytes) + " World" (6 bytes) = 11 bytes total host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { @@ -223,7 +223,7 @@ func TestH1Reconnect(t *testing.T) { var requestCount atomic.Int64 host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) if !readH1Request(reader) { @@ -232,7 +232,7 @@ func TestH1Reconnect(t *testing.T) { requestCount.Add(1) resp := "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 2\r\n\r\nOK" - conn.Write([]byte(resp)) + _, _ = conn.Write([]byte(resp)) }) defer cleanup() @@ -265,14 +265,14 @@ func TestH1LargeResponse(t *testing.T) { largeBody := bytes.Repeat([]byte("X"), bodySize) host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { return } header := fmt.Sprintf("HTTP/1.1 200 OK\r\nContent-Length: %d\r\n\r\n", bodySize) - conn.Write([]byte(header)) + _, _ = conn.Write([]byte(header)) // Write body in chunks to avoid buffering the entire thing written := 0 for written < bodySize { @@ -307,7 +307,7 @@ func TestH1LargeResponse(t *testing.T) { func TestH1ConcurrentWorkers(t *testing.T) { host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { @@ -353,7 +353,7 @@ func TestH1ConcurrentWorkers(t *testing.T) { func TestH1ErrorRecovery(t *testing.T) { host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { @@ -385,14 +385,14 @@ func TestH1ErrorRecovery(t *testing.T) { func TestH1MaxResponseSize(t *testing.T) { const bodySize = 1024 host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) if !readH1Request(reader) { return } body := bytes.Repeat([]byte("X"), bodySize) resp := fmt.Sprintf("HTTP/1.1 200 OK\r\nContent-Length: %d\r\n\r\n%s", bodySize, body) - conn.Write([]byte(resp)) + _, _ = conn.Write([]byte(resp)) // Close connection after sending so drainH1Response gets EOF. }) defer cleanup() @@ -416,7 +416,7 @@ func TestH1MaxResponseSize(t *testing.T) { func TestH1MaxResponseSizeChunked(t *testing.T) { host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) if !readH1Request(reader) { return @@ -430,7 +430,7 @@ func TestH1MaxResponseSizeChunked(t *testing.T) { chunk2 := strings.Repeat("Y", 500) sb.WriteString(fmt.Sprintf("%x\r\n%s\r\n", len(chunk2), chunk2)) sb.WriteString("0\r\n\r\n") - io.WriteString(conn, sb.String()) + _, _ = io.WriteString(conn, sb.String()) // Close after sending so any drain gets EOF. }) defer cleanup() @@ -454,7 +454,7 @@ func TestH1MaxResponseSizeChunked(t *testing.T) { func TestH1ZeroContentLength(t *testing.T) { host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { @@ -487,7 +487,7 @@ func TestH1MultipleWorkersConnectionIsolation(t *testing.T) { // Each keep-alive worker should have its own connection. // We verify by checking that no panics or data races occur. host, port, cleanup := startH1Server(t, func(conn net.Conn) { - defer conn.Close() + defer func() { _ = conn.Close() }() reader := bufio.NewReader(conn) for { if !readH1Request(reader) { diff --git a/h2client_test.go b/h2client_test.go index 6a5b8fd..4587b38 100644 --- a/h2client_test.go +++ b/h2client_test.go @@ -18,10 +18,10 @@ import ( // testH2Cfg builds a Config suitable for newH2Client in tests. func testH2Cfg(method string, headers map[string]string, body []byte, numConns, maxStreams int) Config { return Config{ - Method: method, + Method: method, Headers: headers, - Body: body, - HTTP2: true, + Body: body, + HTTP2: true, HTTP2Options: HTTP2Options{ Connections: numConns, MaxStreams: maxStreams, @@ -42,19 +42,19 @@ func startH2CServer(t *testing.T, maxStreams uint32) (host, port string, cleanup body2MB := make([]byte, 2<<20) mux := http.NewServeMux() - mux.HandleFunc("/simple", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/simple", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write([]byte("OK")) }) - mux.HandleFunc("/medium", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/medium", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write(make([]byte, 64*1024)) }) - mux.HandleFunc("/large", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/large", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write(body1MB) }) - mux.HandleFunc("/xlarge", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/xlarge", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write(body2MB) }) From be063a547a466d18b9f456744c97d681f0c19f5f Mon Sep 17 00:00:00 2001 From: Albert Bausili Date: Sun, 29 Mar 2026 04:26:15 +0200 Subject: [PATCH 5/5] fix: unused parameter t in TestBenchmarkerH2Validation (revive) --- benchmarker_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarker_test.go b/benchmarker_test.go index b56b22f..aedb4d4 100644 --- a/benchmarker_test.go +++ b/benchmarker_test.go @@ -429,7 +429,7 @@ func TestBenchmarkerH2Validation(t *testing.T) { } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { + t.Run(tt.name, func(_ *testing.T) { // New() applies defaults for zero values, so these should succeed. // We test that the defaults are applied correctly. b, err := New(tt.cfg)