New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/vet: printf findings can be arbitrarily long #15907

adonovan opened this Issue May 31, 2016 · 2 comments


None yet
4 participants

adonovan commented May 31, 2016

When vet reports a printf problem such as this one:

fmt.Printf("%d", func() { ... }) // arg in printf call is a function value, not a function call

it prints out the entire body of the function literal, which can be quite long.
For example, given the program at, vet prints

% go vet ~/a.go
../../../../a.go:6: arg func() {
... dozens more lines...
} in printf call is a function value, not a function call

Perhaps it should not print the function body at all.


This comment has been minimized.


josharian commented May 31, 2016


This comment has been minimized.


valyala commented Jun 1, 2016

Currently long vet output isn't limited by -printf check and/or by long function bodies. For instance, complex composite literal may result in a long vet output too.

@quentinmit quentinmit added this to the Unplanned milestone Jun 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment