The string concatenation warning is useful, but there are times where fmt.Sprintf is more readable and performance is decent enough. One such example is in unit tests.
Ideally, the warning could be disabled based on file patterns (enforce only for runtime code), but a general flag would be sufficient too.
The string concatenation warning is useful, but there are times where
fmt.Sprintf
is more readable and performance is decent enough. One such example is in unit tests.Ideally, the warning could be disabled based on file patterns (enforce only for runtime code), but a general flag would be sufficient too.