jeudi 12 décembre 2019

Golang test complain about sub package version

HI I have my app that has a structure like this:

root/
 main.go
 pkg_a/
  fileUtil.go
 pkg_b/
  writeData.go
  writeData_test.go

either writeData* file import the package "pkg_a". When I was developing in master branch either "go build" and "go test" work well. When I switched to another branch, go build still continue to work but go test complained about "pkg_a" with:

no matching versions for query "latest"

But, if i remove the import of the package from writeData_test.go (still used into writeData.go) go test work well. Obviously writeData_test.go call function contained in writeData.go that uses function within fileUtil.go.

What can be the problem? thank in advanced for the help

Aucun commentaire:

Enregistrer un commentaire