# go path 配置 export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
# 生效配置 source ~/.zshrc
# 执行go env 查看配置是否生效 go env
安装 go 组件
# 配置 go 加速 go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct
# 配置 go sumdb go env -w GOSUMDB="sum.golang.org"
# 安装组件 go install -v golang.org/x/tools/gopls@latest go install -v github.com/ramya-rao-a/go-outline@latest go install -v github.com/josharian/impl@latest go install -v github.com/fatih/gomodifytags@latest go install -v github.com/ramya-rao-a/go-outline@latest go install -v github.com/josharian/impl@latest go install -v github.com/fatih/gomodifytags@latest go install -v golang.org/x/tools/gopls@latest go install -v github.com/mdempsky/gocode@latest go install -v github.com/cweill/gotests/gotests@v1.6.0 go install -v github.com/haya14busa/goplay/cmd/goplay@v1.0.0 go install -v github.com/go-delve/delve/cmd/dlv@latest go install -v golang.org/x/tools/cmd/goimports@latest