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
$ staticcheck -version
staticcheck 2020.1.5
$ staticcheck -debug.version
staticcheck 2020.1.5
Compiled with Go version: go1.14.4
Main module:
honnef.co/go/tools@v0.0.1-2020.1.5 (sum: h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=)
Dependencies:
github.com/BurntSushi/toml@v0.3.1 (sum: h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=)
golang.org/x/tools@v0.0.0-20191130070609-6e064ea0cf2d (sum: h1:/iIZNFGxc/a7C3yWjGcnboV+Tkc7mxr+p6fDztwoxuM=)
$ go version
go version go1.15 darwin/amd64
go env provided upon request.
package main
import (
"io""unsafe"
)
var (
w io.Writersz=unsafe.Sizeof(w)
)
funcmain() {
println(sz)
}
$ go run main.go
16
$ staticcheck main.go
main.go:9:2: var w is unused (U1000)
The text was updated successfully, but these errors were encountered:
dominikh
changed the title
unused: false positive for zero value interface at package level
unused: false positive when only use is constant expression
May 30, 2021
go env
provided upon request.The text was updated successfully, but these errors were encountered: