1、下载go

https://golang.google.cn/dl/

也可以实用brew   brew info go   来下载,或者是进入官网下载:https://golang.org/dl/

 

1.1下载brew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

mac go配置,环境配置

 

 

 

2、安装goland

https://www.jetbrains.com/go/download/

  

3、添加 go get速度慢的问题

go env -w GO111MODULE=on  (这个地方参数如果平常用,打包的时候需要使用go mon,如果关闭可以正常打包)go env -w GO111MODULE=off
go env -w GOPROXY=https://goproxy.cn,direct

  mac go配置,环境配置

 

 

 

 

4、下载proto

brew info protobuf   (查看)

brew install protobuf (安装)

protoc --version (查看版本)

mac go配置,环境配置

 mac go配置,环境配置

 4.1、使用proto编译时候,需要protoc-gen-go来进行编.   (建议参考)https://blog.csdn.net/wangxinxinsj/article/details/90294238

mac go配置,环境配置

   

go get github.com/golang/protobuf/protoc-gen-go
go get -u -v github.com/golang/protobuf/protoc-gen-go

  

mac go配置,环境配置

 

mac go配置,环境配置

 

相关文章:

  • 2021-07-10
  • 2021-09-01
  • 2021-09-29
  • 2021-11-08
  • 2021-09-24
  • 2022-12-23
  • 2021-11-05
  • 2021-12-03
猜你喜欢
  • 2021-08-26
  • 2022-02-14
  • 2022-12-23
  • 2020-01-02
  • 2021-10-11
  • 2021-06-19
相关资源
相似解决方案