You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt"
)
func main() {
fmt.Sprintf("my first input %s with my second input %s with a really long string i want on two lines "+
"should pass linting for my third input %s", "cat", "dog", "turtle")
}
The above should pass linting but it fails because the last %s is on a different line with:
server/server.go:216:4: Sprintf format %s arg err.Error is a func value, not called (govet)
fmt.Sprintf("my first input %s with my second input %s with a really long string i want on two lines "+
^
make: *** [lint] Error 1
The text was updated successfully, but these errors were encountered:
tylercloke
changed the title
[cmd/vet] Linting for Sprintf fails for multiline strings
[cmd/vet] Linting for Sprintf fails for multiline strings with inputs on the second line
Aug 31, 2018
FiloSottile
changed the title
[cmd/vet] Linting for Sprintf fails for multiline strings with inputs on the second line
cmd/vet: Linting for Sprintf fails for multiline strings with inputs on the second line
Aug 31, 2018
What version of Go are you using (
go version
)?go version go1.10 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/MoGKsOD0tVk
What did you expect to see?
gotvet
should passWhat did you see instead?
The above should pass linting but it fails because the last
%s
is on a different line with:The text was updated successfully, but these errors were encountered: