I ran into the same issue with Go11
, just wanted to share how I did solve it for helping others just in case they run into the same issue.
I had my Go project outside $GOPATH
, so I had to turned on GO111MODULE=on
without this option turned on, it will give you this issue; even if you you try to build or test the whole package
or directory
it won't be solved without GO111MODULE=on