Closed AndreyBronin closed 5 years ago
@AndreyBronin Thanks for the bug report! Can you please update the minimock and confirm that the problem is fixed?
Now I get another error. I am using dep v0.5.0 instead go mod, go version go1.11.2 darwin/amd64
$ minimock -i github.com/insolar/insolar/network.HostNetwork -o ./testutils/network/
minimock: failed to detect import path of the ./testutils/network/: "/Users/bronin/go/src/github.com/insolar/insolar/testutils/network" is out of GOPATH and go.mod file is not found in any of the parent directories
workaround is not working now
@AndreyBronin The only solution I see in your case (using dep) is to add "/Users/bronin/go" to GOPATH, otherwise minimock won't be able to resolve neither ./testutils/network/ nor github.com/insolar/insolar/network
I checked again, dep works with workaround
@AndreyBronin this should be fixed now. Please check out the latest version of minimock (v2.0.0) and give it a try. Feel free to reopen this issue if the problem persists.
Fails with error minimock: failed to detect import path of the ...: can't detect package for file: "..."
Workaround is GOPATH=`go env GOPATH` minimock -i path -o bla bla