From 886425ee133a84abdd39a510adb87be42d45e21b Mon Sep 17 00:00:00 2001 From: Nicholas Wiersma Date: Mon, 19 Oct 2026 11:59:44 +0200 Subject: [PATCH 1/2] chore: bump go and linter --- .github/workflows/test.yml | 2 +- .golangci.yml | 7 ++++++- go.mod | 2 +- retry/rety_internal_test.go | 20 ++++++++++---------- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4741b56..9f01141 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: lint: runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.11.3 + GOLANGCI_LINT_VERSION: v2.15.0 steps: - name: Checkout code diff --git a/.golangci.yml b/.golangci.yml index 3edc5c1..661c0b2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,7 +8,10 @@ formatters: - goimports settings: gofumpt: - extra-rules: true + extra: + group-params: true + clothe-returns: true + balance-calls: true gci: sections: - standard @@ -25,9 +28,11 @@ linters: - err113 - exhaustive - exhaustruct + - exhaustruct_v5 - funcorder - funlen - gochecknoglobals + - gomodguard - mnd - nlreturn - noinlineerr diff --git a/go.mod b/go.mod index b3e29b0..7fbcc7e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hamba/testutils -go 1.25.13 +go 1.26.9 require ( github.com/ryanuber/go-glob v1.0.0 diff --git a/retry/rety_internal_test.go b/retry/rety_internal_test.go index 13a6322..9f4d9c9 100644 --- a/retry/rety_internal_test.go +++ b/retry/rety_internal_test.go @@ -26,36 +26,36 @@ func TestT(t *testing.T) { }, { name: "Logf", - fn: func(t *SubT) { t.Logf("%s", "test") }, - wantLog: []string{"test"}, + fn: func(t *SubT) { t.Logf("%s", "test1") }, + wantLog: []string{"test1"}, wantFailed: false, wantExit: false, }, { name: "Error", - fn: func(t *SubT) { t.Error("test") }, - wantLog: []string{"test"}, + fn: func(t *SubT) { t.Error("test2") }, + wantLog: []string{"test2"}, wantFailed: true, wantExit: false, }, { name: "Errorf", - fn: func(t *SubT) { t.Errorf("%s", "test") }, - wantLog: []string{"test"}, + fn: func(t *SubT) { t.Errorf("%s", "test3") }, + wantLog: []string{"test3"}, wantFailed: true, wantExit: false, }, { name: "Fatal", - fn: func(t *SubT) { t.Fatal("test") }, - wantLog: []string{"test"}, + fn: func(t *SubT) { t.Fatal("test4") }, + wantLog: []string{"test4"}, wantFailed: true, wantExit: true, }, { name: "Fatalf", - fn: func(t *SubT) { t.Fatalf("%s", "test") }, - wantLog: []string{"test"}, + fn: func(t *SubT) { t.Fatalf("%s", "test5") }, + wantLog: []string{"test5"}, wantFailed: true, wantExit: true, }, From 58ef46982946ef21418ee8fd6fa8a11b9cba199f Mon Sep 17 00:00:00 2001 From: Nicholas Wiersma Date: Mon, 19 Oct 2026 12:00:53 +0200 Subject: [PATCH 2/2] fix: workflows --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f01141..f961389 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: test: strategy: matrix: - go-version: [ "1.25", "1.26" ] + go-version: [ "1.26", "1.27" ] runs-on: ubuntu-latest env: GOTESTSUM_VERSION: v1.13.0