I have a project which is intended to have completely own environment. That means:
.deps\go
subfolder). There is a special build.cmd
file which sets GOROOT and GOPATH accordingly and builds the application. That cmd file works fine.
But, when I open the project in GoLand, it shows a lot of complains like "Unexported type usage" about all builtin types, such as string
, bool
, float64
, etc.
This is a screenshot of how it looks like in GoLand
When I Ctrl-click on the type name I'm getting to the
builtin.go
file inside the custom GOROOT, but it is shown with a lot of "Invalid recursive type" errors:
The GOROOT and GOPATH settings in the Settings dialog are set accordingly (but there is another installation of the Go tools on the computer, if that does matter).
The question is: why GoLand produces those complains and what should I do to overcome them?
The problem is that the Go SDK is located inside the project so GoLand thinks that the user's files are inside. Excluding the .deps
directory in Preferences | Project Structure should help.