-
Method 1: Manual
-
Download tar.gz from https://golang.org/dl/
-
Extract:
$ sudo -C /usr/local -xzf go1.14.12.linux-amd64.tar.gz
-
Add to PATH env var. Edit
$HOME/.profile
, add the following line:$ export PATH=$PATH:/usr/local/go/bin
-
Verify
$ go version
-
-
Method 2: Using Snap
$ sudo snap install go --channel=1.14/stable --classic
-
Install recommended packages
ctrl + shift + P
- type: go install/update tools
- install tools
-
To fix issues with
gopls
, just add a new workspace withsrc