Skip to content

FOLIO-4382: golangci-lint 2.13 fixing go 1.27.0 math/rand/v2 issue - #168

Merged
dcrossleyau merged 2 commits into
masterfrom
FOLIO-4382
Aug 27, 2026
Merged

FOLIO-4382: golangci-lint 2.13 fixing go 1.27.0 math/rand/v2 issue#168
dcrossleyau merged 2 commits into
masterfrom
FOLIO-4382

Conversation

@julianladisch

@julianladisch julianladisch commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Bump golangci-lint from 2.12 to 2.13.

This fixes the issue with go 1.27.0 - https://github.com/folio-org/mod-reporting/actions/runs/32832861654/job/97755229206:

  Running [/home/runner/golangci-lint-2.12.2-linux-amd64/golangci-lint run  --config=src/.golangci.yml --disable errcheck --disable staticcheck --enable gosec] in [/home/runner/work/mod-reporting/mod-reporting] ...
  Error: ../../../../../../opt/hostedtoolcache/go/1.27.0/x64/src/crypto/internal/randutil/randutil.go:11:2: could not import math/rand/v2 (/opt/hostedtoolcache/go/1.27.0/x64/src/math/rand/v2/rand.go:213:17: method must have no type parameters) (typecheck)
    "math/rand/v2"
  Error: ../../../../../../opt/hostedtoolcache/go/1.27.0/x64/src/crypto/internal/randutil/randutil.go:21:5: undefined: rand (typecheck)
    if rand.Uint64()&1 == 1 {

Bump golangci-lint from 2.12 to 2.13.

This fixes the issue with go 1.27.0:

```
  Running [/home/runner/golangci-lint-2.12.2-linux-amd64/golangci-lint run  --config=src/.golangci.yml --disable errcheck --disable staticcheck --enable gosec] in [/home/runner/work/mod-reporting/mod-reporting] ...
  Error: ../../../../../../opt/hostedtoolcache/go/1.27.0/x64/src/crypto/internal/randutil/randutil.go:11:2: could not import math/rand/v2 (/opt/hostedtoolcache/go/1.27.0/x64/src/math/rand/v2/rand.go:213:17: method must have no type parameters) (typecheck)
    "math/rand/v2"
  Error: ../../../../../../opt/hostedtoolcache/go/1.27.0/x64/src/crypto/internal/randutil/randutil.go:21:5: undefined: rand (typecheck)
    if rand.Uint64()&1 == 1 {
```
@MikeTaylor

Copy link
Copy Markdown

Perfect, thank you for tracking this down!

@dcrossleyau
dcrossleyau merged commit 93c600d into master Aug 27, 2026
5 checks passed
@dcrossleyau
dcrossleyau deleted the FOLIO-4382 branch August 27, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants