Skip to content

Instantly share code, notes, and snippets.

@nikgalushko
Created November 4, 2021 13:13
Show Gist options
  • Save nikgalushko/e1b5c85c64653dd554a7a904bbef4eee to your computer and use it in GitHub Desktop.
Save nikgalushko/e1b5c85c64653dd554a7a904bbef4eee to your computer and use it in GitHub Desktop.
7 steps to configure local system for playing with Golang generics before go 1.18

Install gotip

go install golang.org/dl/gotip@latest
gotip download

Install latest gopls

mkdir /tmp/gopls && cd "$_"
gotip mod init gopls-unstable
gotip get golang.org/x/tools/gopls@master golang.org/x/tools@master
gotip install golang.org/x/tools/gopls

Configure VSCode

Set "go.goroot" in settigs.json to the path of installed gotip (in my machine this path is ~/sdk/gotip).

@zacharysyoung
Copy link

Not obvious to me that setting goroot to gotip doesn't mean which gotip and taking that path. Need to use gotip env GOROOT (from this Reddit) and supply that value in settings.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment