Skip to content

Instantly share code, notes, and snippets.

@cgcardona
Created June 4, 2021 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgcardona/81db8c016c8d69e8b8fe9915b0756c56 to your computer and use it in GitHub Desktop.
Save cgcardona/81db8c016c8d69e8b8fe9915b0756c56 to your computer and use it in GitHub Desktop.

Golang Dev Environment Setup

GVM (Golang Version Manager)

# Install gvm
zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

# Install golang v1.16
gvm install go1.16

# Use golang v1.16
gvm use go1.16

# Check your golang version
go version
go version go1.16 darwin/amd64

VSCode Integration

launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch Package",
      "type": "go",
      "request": "launch",
      "mode": "auto",
      "program": "hello-world.go"
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment