英文:
How to know which version of golang is used in Bazel Build?
问题
在执行bazel build //...
命令构建一个Golang项目时,有没有办法打印出Golang的版本?如果没有,有没有办法配置bazel使用的Golang版本?
英文:
When performing a bazel build //...
for a golang project, is there any way I can print the golang version? If not, is there any way to configure which version of golang is used by bazel?
答案1
得分: 1
你应该能够在你的 Bazel WORKSPACE
中使用 go-register-toolchains 规则 配置 Go 版本,例如:
go_register_toolchains(version = "1.15.5")
英文:
You should be able to configure the Go version in your Bazel WORKSPACE
using the go-register-toolchains rule, e.g.:
go_register_toolchains(version = "1.15.5")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论