蓝天

go-zero开发之安装goctl及go-zero开发依赖

安装 goctl

go 版本在 1.16 及以后执行:

GO111MODULE=on&&go install github.com/zeromicro/go-zero/tools/goctl@latest

go 版本在 1.16 之前执行:

GO111MODULE=on&&go get -u github.com/zeromicro/go-zero/tools/goctl@latest

验证是否安装成功:

# goctl --version
goctl version 1.6.0 linux/amd64
  • 安装参考
https://go-zero.dev/docs/tasks/installation/goctl

一键安装 protoc、protoc-gen-go 和 protoc-gen-go-grpc 相关组件

# goctl env check --install --verbose --force
[goctl-env]: preparing to check env

[goctl-env]: looking up "protoc"
[goctl-env]: "protoc" is installed

[goctl-env]: looking up "protoc-gen-go"
[goctl-env]: "protoc-gen-go" is installed

[goctl-env]: looking up "protoc-gen-go-grpc"
[goctl-env]: "protoc-gen-go-grpc" is installed

[goctl-env]: congratulations! your goctl environment is ready!

验证是否安装成功:

# goctl env check --verbose
[goctl-env]: preparing to check env

[goctl-env]: looking up "protoc"
[goctl-env]: "protoc" is installed

[goctl-env]: looking up "protoc-gen-go"
[goctl-env]: "protoc-gen-go" is installed

[goctl-env]: looking up "protoc-gen-go-grpc"
[goctl-env]: "protoc-gen-go-grpc" is installed

[goctl-env]: congratulations! your goctl environment is ready!
  • 安装参考
https://go-zero.dev/docs/tasks/installation/protoc

posted on 2023-12-06 22:44  #蓝天  阅读(245)  评论(0编辑  收藏  举报

导航