I noticed that go 1.22 started emitting
warning: GOPATH set to GOROOT ($HOME/go) has no effect
and VSCode plugin noisily emits "Failed to run ..." messages
due to this warning message).
Although
https://go.dev/doc/install suggests doing
tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
and
export PATH=$PATH:/usr/local/go/bin
, I'm doing
tar -C $HOME -xzf go1.21.7.linux-amd64.tar.gz
and
export PATH=$PATH:~/go/bin/
so that external packages can be installed without requiring
the write permission under /usr/local/go/ directory.
Installing under $HOME worked without problems until go 1.21.7 .
If this is an intentional change, please update
https://go.dev/doc/install
to explicitly comment that installing under $HOME is not possible.