You are neither in a module nor in your GOPATH. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue: https://github.com/golang/go/issues/new. code example
Example: visual studio code you are neither in a module nor in your gopath
# for windows before starting visual studio code :
set GO111MODULE=on