CBG-4282 silence non-constant format govet error #7140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a more strict version of govet that is coming in go 1.24 and is already present in golangci-lint 1.24. All of the things flagged were false positives.
NewHTTPError
to cover when there are no arguments. I could have changed this code toNewHTTPErrorf(status, "%s", msg)
but this seemed weird to me and like you wouldn't be sure why you had to use this code and would look this up.FileLogger.log
function but this could easily uselogf("%s", msg)
in the places we are using it likestatsLogger
andconditionalPrintf
since they are called very irregularly.I don't feel strongly about these implementation choices.