--- title: golang 開發環境 tags: golang --- # 安裝gvm * [gvm](https://github.com/moovweb/gvm) ``` zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) ``` ``` brew install go gvm install go1.8 gvm use go1.8 [--default] brew uninstall go ``` # 安裝Extensions * [go](https://marketplace.visualstudio.com/items?itemName=golang.Go) ```json= "[go]": { "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.defaultFormatter": "golang.go" } ``` # 安裝 air * [air](https://github.com/cosmtrek/air) ``` go install github.com/cosmtrek/air@latest air init air ```