We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ cat ~/tmp/test/haha.go package haha type A struct{ i int } $ go tool cover -mode=atomic ~/tmp/test/haha.go package haha import _cover_atomic_ "sync/atomic" type A struct { i int } var _ = _cover_atomic_.AddUint32 var GoCover = struct { Count [0]uint32 Pos [3 * 0]uint32 NumStmt [0]uint16 } { Pos: [3 * 0]uint32{ }, NumStmt: [0]uint16{ }, }
If not needed, sync/atomic shouldn't be imported. Expected to see instrumented code like below
sync/atomic
$ go tool cover -mode=atomic ~/tmp/test/haha.go package haha type A struct { i int } var GoCover = struct { Count [0]uint32 Pos [3 * 0]uint32 NumStmt [0]uint16 } { Pos: [3 * 0]uint32{ }, NumStmt: [0]uint16{ }, }
sync/atomic was imported, even though it's not used (well, except for blank assignment, but that's to prevent unused compiler errors).
The text was updated successfully, but these errors were encountered:
Why does it matter to you?
Sorry, something went wrong.
This is not critical, but it's better if we can avoid importing unused dependencies. Looks like it's easier to do: golang.org/cl/32763
CL https://golang.org/cl/32763 mentions this issue.
As discussed in the CL, this adds more complexity for less value. Closing the issue.
No branches or pull requests
What did you do?
What did you expect to see?
If not needed,
sync/atomic
shouldn't be imported. Expected to see instrumented code like belowWhat did you see instead?
sync/atomic
was imported, even though it's not used (well, except for blank assignment, but that's to prevent unused compiler errors).The text was updated successfully, but these errors were encountered: