如何在Golang中无错误地修改/开发Go标准库?

I would like to edit the Go standard library, so I can submit a pull request to the https://github.com/golang/go project.

I've checked out the source locally and I've opened the src subdirectory as a Goland project.

I run into issues because Goland is still using my local Go SDK (in /usr/local/go). This means when I edit files that use an internal package, I get errors in the editor. Goland is first looking in my system SDK, before it considers the files in my project.

In the Goland preferences, I tried setting the GOROOT to point at my checked out code (in my case, ~/git/go), but Goland complains "The selected directory is not a valid home for Go SDK".

I also tried setting GOROOT to "<No SDK>", but then Goland failed to resolve any types at all. Red error lines everywhere.

Any suggestions for how to hack on the Go standard library in Goland without errors?