From 7f7f9570654a8ac798433113797bc50a73e933bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Soul=C3=A9?= Date: Sat, 14 Feb 2026 22:45:26 +0100 Subject: [PATCH] test: also test with go v1.26 and use golangci-lint v2.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime Soulé --- .github/workflows/ci.yml | 6 +++--- README.md | 2 +- match_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3d6dfe..d8cc95e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,10 @@ jobs: test: strategy: matrix: - go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, tip] + go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, 1.25.x, tip] full-tests: [false] include: - - go-version: 1.25.x + - go-version: 1.26.x full-tests: true runs-on: ubuntu-latest @@ -32,7 +32,7 @@ jobs: if: matrix.full-tests run: | curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | - sh -s -- -b $HOME/go/bin v2.4.0 + sh -s -- -b $HOME/go/bin v2.9.0 $HOME/go/bin/golangci-lint run - name: Testing diff --git a/README.md b/README.md index 7efb11f..e19ee02 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Easy mocking of http responses from external resources. ## Install -Currently supports Go 1.16 to 1.24 and is regularly tested against tip. +Currently supports Go 1.16 to 1.26 and is regularly tested against tip. `v1` branch has to be used instead of `master`. diff --git a/match_test.go b/match_test.go index e6981ce..135f73d 100644 --- a/match_test.go +++ b/match_test.go @@ -243,7 +243,7 @@ func newMR(name string, num int) httpmock.MatchResponder { func checkMRs(t testing.TB, mrs httpmock.MatchResponders, names ...string) { td.Cmp(t, mrs, td.Smuggle( func(mrs httpmock.MatchResponders) []string { - var ns []string + ns := make([]string, 0, len(mrs)) for _, mr := range mrs { ns = append(ns, fmt.Sprintf("%s:%d", mr.Matcher().Name(), findMatcher(mr.Matcher().FnPointer())))