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
This check is included in the new vet tests run in go test in Go 1.10 beta 1. In my opinion this is too far away from a 100% check, and mostly a style one at that. It fails tests on a binary that includes a
fmt.Println(`Usage: somecommand <args>Description of the command.More text here.`)
and while it's correct (the string ends with a newline, and Println will add one more) this is the intended effect. You could argue that we should use cmd.Print instead and add the newline manually, and we could do that, but honestly I'm fine with it as is and think it should pass tests.
The text was updated successfully, but these errors were encountered:
The topic of which issues to include in go vet as run by go test is being discussed on #18085. I've copied this comment over to that issue. Closing this issue to keep all the discussion in one place.
I've run into this one as well, with almost the exact same code as the OP (a print of usage info for a binary).
Easy enough to work around, I guess, but annoying.
This check is included in the new vet tests run in
go test
in Go 1.10 beta 1. In my opinion this is too far away from a 100% check, and mostly a style one at that. It fails tests on a binary that includes aand while it's correct (the string ends with a newline, and Println will add one more) this is the intended effect. You could argue that we should use cmd.Print instead and add the newline manually, and we could do that, but honestly I'm fine with it as is and think it should pass tests.
The text was updated successfully, but these errors were encountered: