Go build error " go: no matching versions for query "latest" "

Viewed 5889

I'm trying to find the test coverage inside the package but the build fails without any error. There's no error when I tried to find the test coverage for other packages inside the same project. I'm using goland to find the test coverage.When I'm trying to build the package I'm getting the " go: no matching versions for query "latest" " error. Tried restarting the pc, it's not working. The directory structure is :

foo-> fooPackage->foo.go

The error message I'm getting

FAIL project/utilities/rest/sign [build failed]

Any help would be appreciated. Thanks in advance

1 Answers

To clean your mod cache:

go clean -modcache

You can also fetch a specific version:

go get -u github.com/author/pkgname@semver (v0.0.0-20180830031419-95f893ade6f2)

Related