type checking failed for main
prog.go2:6:2: could not import go.uber.org/goleak (cannot find package "go.uber.org/goleak" in any of:
/usr/local/go-faketime/src/go.uber.org/goleak (from $GOROOT)
/go/src/go.uber.org/goleak (from $GOPATH))
If I try to run this test locally, following error is printed:
type checking failed for main
x_test.go2:6:2: could not import go.uber.org/goleak (/Users/yoshiki.shibata/gocode/pkg/mod/go.uber.org/goleak@v1.1.10/tools.go:27:4: could not import golang.org/x/lint/golint (/Users/yoshiki.shibata/gocode/pkg/mod/golang.org/x/lint@v0.0.0-20190930215403-16217165b5de/golint/golint.go:19:2: could not import golang.org/x/lint (/Users/yoshiki.shibata/gocode/pkg/mod/golang.org/x/lint@v0.0.0-20190930215403-16217165b5de/lint.go:27:2: could not import golang.org/x/tools/go/gcexportdata (importing "golang.org/x/tools/go/gcexportdata": multiple Go packages in /Users/yoshiki.shibata/gocode/pkg/mod/golang.org/x/tools@v0.0.0-20191108193012-7d206e10da11/go/gcexportdata)
)
)
)
I guess the go2go doesn't handle +build ignore tag in main.go under golang.org/x/tools/go/gcexportdata.
Following program ( https://go2goplay.golang.org/p/uy8mEvhNsI2 ) cannot be compiled:
With the go2 playground:
But you can run with Go playground: https://play.golang.org/p/uy8mEvhNsI2
If I try to run this test locally, following error is printed:
I guess the go2go doesn't handle
+build ignore
tag inmain.go
undergolang.org/x/tools/go/gcexportdata
.