The PR enables the perfsprint linter in the golangci-lint configuration file. The fasthttp library is heavily focused on performance, making this linter a beneficial addition.
This PR fixes up the lint issues that arose from persprint. All of these were minor:
replace fmt.Errorf("msg") with errors.New("msg));
replace fmt.Sprintf("%d", n) with strconv.Itoa(n) in tests.
The PR enables the
perfsprint
linter in the golangci-lint configuration file. Thefasthttp
library is heavily focused on performance, making this linter a beneficial addition.This PR fixes up the lint issues that arose from
persprint
. All of these were minor:fmt.Errorf("msg")
witherrors.New("msg))
;fmt.Sprintf("%d", n)
withstrconv.Itoa(n)
in tests.