Skip to content

Fix non-constant format string in test server - #160

Open
HNO3Miracle wants to merge 1 commit into
google:mainfrom
HNO3Miracle:fix-nonconstant-fprintf
Open

HNO3Miracle wants to merge 1 commit into
google:mainfrom
HNO3Miracle:fix-nonconstant-fprintf

Conversation

@HNO3Miracle

Copy link
Copy Markdown

Summary

Use fmt.Fprint when writing a prebuilt HTTP response in the test server. The response is data rather than a format string, and current Go vet rejects passing it directly to fmt.Fprintf.

Testing

  • go test -run '^$' ./...

Newer Go vet rejects non-constant format strings passed to fmt.Fprintf. Use
fmt.Fprint because the test writes a prebuilt HTTP response body rather than a
format string. This only changes test helper output and does not affect library
behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant