I am trying to install Go tools in my VS Code editor and when I select the View, CMD, Install and select Go: Install/Update tools, I get this -> "command 'go.tools.install' not found" What am I doing wrong?
As seen in Microsoft/vscode-go issue 755:
For all guys who are stuck with command '
go.tools.install' not found problem on Windows.Check if
%GOPATH%\binis in yourPATHenvironment variable.
After half and an hour I finally figured out thatPATHremains unchanged if you try to change it likeset PATH=%PATH%.... You need explicitly change it in your system settings.
With recent Go installation, make sure GOROOT reference your Go installation folder.
I also like to set go.goroot to that folder in the settings of VSCode.
You don't need GOPATH: it defaults to %USERPROFILE%\go: make sure %USERPROFILE%\go\bin is in your PATH, before launching VSCode.
%USERPROFILE%\go, since it is reserved for GOPATH)C:\path\to\go (where you just uncompressed the Go archive)%GOROOT%\bin to %PATH%If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With