diff --git a/.github/workflows/on-pull-request.yaml b/.github/workflows/on-pull-request.yaml index e3519a1..f84a447 100644 --- a/.github/workflows/on-pull-request.yaml +++ b/.github/workflows/on-pull-request.yaml @@ -13,12 +13,7 @@ on: jobs: on-pull-request: name: test - strategy: - matrix: - go-version: - - 1.24.x - os: [ ubuntu-latest ] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v5 @@ -26,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: ${{ matrix.go-version }} + go-version-file: go.mod cache: true # caching and restoring go modules and build outputs - run: go env @@ -45,7 +40,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.6.1 + version: v2.15.0 skip-cache: true # cache/restore is done by actions/setup-go@v3 step args: -v diff --git a/Makefile b/Makefile index a57b60d..458d732 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GOLANGCI_LINT = $(GOPATH)/bin/golangci-lint -GOLANGCI_LINT_VERSION = v1.61.0 +GOLANGCI_LINT_VERSION = v2.15.0 $(GOLANGCI_LINT): ## Download Go linter curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_LINT_VERSION) diff --git a/go.mod b/go.mod index 7f95eba..5eeb2a5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/groupcache/groupcache-go/v3 -go 1.24.0 +go 1.26.10 require ( github.com/kapetan-io/tackle v0.13.0 diff --git a/transport/mock_transport.go b/transport/mock_transport.go index f72ecc9..da34b33 100644 --- a/transport/mock_transport.go +++ b/transport/mock_transport.go @@ -182,7 +182,7 @@ func (s *peerStats) Report() string { // Map keys have no guaranteed order, so we sort the keys here. slices.Sort(sorted) for i := 0; i < len(sorted); i++ { - b.WriteString(fmt.Sprintf("%s = %d ", sorted[i], s.stats[sorted[i]])) + fmt.Fprintf(&b, "%s = %d ", sorted[i], s.stats[sorted[i]]) } return strings.TrimSpace(b.String()) }