This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Can't load package error on main package in src/cmd folder #984
Closed
Description
I'm on OSX. This looks like a behavior with go build and not with vscode-go. If there is a main package in the src/cmd folder or a subfolder, it will ignore the GOPATH and will look in libexec.
This is error will show up when go.buildOnSave = true.
This command builds fine:
laptop:~/godev/workspace/src go build cmdd/another
This command throws an error:
laptop:~/godev/workspace/src go build cmd/another
can't load package: package cmd/another: open /usr/local/Cellar/go/1.8.1/libexec/src/cmd/another: no such file or directory
A way to solve this would be to add ./ to the front of the package to let build know it's local. I don't know if this would break any current functionality.