Goland 环境配置
使用homeBrew 安装Goland
brew install go
截屏2021-03-07 下午4.22.51.png
vi ~/.zshrc
# go
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
测试一下是否成功
// hello.go
package main
import "fmt"
func main() {
fmt.Printf("Hello, world!")
}
网友评论