Closed ccoVeille closed 4 months ago
Is it not already the case cf -errorf
option
perfsprint -h
perfsprint: Checks that fmt.Sprintf can be replaced with a faster alternative.
Usage: perfsprint [-flag] [package]
Flags:
-V print version and exit
...
-errorf
optimizes fmt.Errorf (default true)
My bad, I launched my test via golangci-lint but there was a local golangci.yaml file that I didn't see, so my global golangci-lint.yaml wasn't used.
Glad it works as expected :-)
Extracted from gosimple discussion
Originally posted by @dominikh in https://github.com/dominikh/go-tools/issues/1550#issuecomment-2138367009
Do you think it makes sense to add it to perfsprint. Errorf is a sprintf wrapper after all