You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This linting error was surfaced from an upgraded golangci-lint:
internal/lockss/peers.go:82:25: regexpMust: for const patterns like v3PeerRegex, use regexp.MustCompile (gocritic)
re, regExCompileErr := regexp.Compile(v3PeerRegex)
^
make: *** [Makefile:114: linting] Error 1
Error: Process completed with exit code 2.
The text was updated successfully, but these errors were encountered:
atc0005
changed the title
regexpMust: for const patterns like v3PeerRegex, use regexp.MustCompile (gocritic)regexpMust: for const patterns like v3PeerRegex, use regexp.MustCompile (gocritic) linting error
Nov 9, 2021
I was already checking for regex compilation error and immediately failing with an error message noting the problem, so I'm not sure if causing a panic is any more useful.
I am already checking for the regex compile error and
immediately returning the error if it occurs. I expect
that the error wrapping I am providing will be more
readable to users than an intentional panic induced
stack trace would be.
refs GH-96
This linting error was surfaced from an upgraded golangci-lint:
The text was updated successfully, but these errors were encountered: