I’ve had this problem for a while. I install a new version of Go, let’s say 1.25, and when I run go version, it tells me it’s version 1.23.
Checking GOROOT using go env GOROOT always shows
C:\Users\MyUser\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.21.3.windows-amd64. Even though I clean everything up, it always removes that directory and installs everything by default.
I set GOROOT update using setx GOROOT "C:\Path\To\Go". Is there any way to update this according to the installation?