Open drfunjohn opened 4 years ago
go version go1.13.4 linux/amd64 GO111MODULE=on GOPATH=/home/ubuntu/go
My project use: go mod vendor
go mod vendor
Tree: MyProject |_ db |_pkg | |_api |vendor | main.go
When I run test from root directory of project by: mocktest -debug ./pkg/api/
mocktest -debug ./pkg/api/
I recieve next error:
....... 2019/12/12 10:31:42 installImports: label: github.com/spf13/cobra, name: github.com/spf13/cobra, mock: false 2019/12/12 10:31:42 GenPkg: srcPath:/home/ubuntu/go, dstRoot:/tmp/withmock781383690/path, name:github.com/spf13/cobra, mock:false ERROR(AddPackage:installImports:GenPkg): Package 'github.com/spf13/cobra' not found in any of '/home/ubuntu/go'.
If I run from api directory: cd pkg/api withmock -debug go test
cd pkg/api
withmock -debug go test
Each time random package appears in the error.
Thanx.
go version go1.13.4 linux/amd64 GO111MODULE=on GOPATH=/home/ubuntu/go
My project use:
go mod vendor
Tree: MyProject |_ db |_pkg | |_api |vendor | main.go
When I run test from root directory of project by:
mocktest -debug ./pkg/api/
I recieve next error:
If I run from api directory:
cd pkg/api
withmock -debug go test
Each time random package appears in the error.
Thanx.