gpt4 book ai didi

google-app-engine - dev_appserver 使用 goroot 1.6 而不是 1.8

转载 作者:IT王子 更新时间:2023-10-29 01:44:34 24 4
gpt4 key购买 nike

我刚刚更新了 google-cloud-sdk,现在 dev_appserver 使用的是 goroot 1.6 而不是 1.8,所以很多东西都没有被识别。到处都看过,我如何告诉 dev_appserver 使用 goroot 1.8 而不是 1.6 ?这看起来微不足道。

最佳答案

Go App Engine SDK 使用 1.6,无法在 App Engine 中运行更高的 Go 版本。 他们的系统经过微调以使用特定版本和功能子集。像 App Engine 这样的大型生产环境必须经过大量的研发才能推出新的 SDK 版本。您只需要等待新版本的出现并使用可用的版本即可。

也就是说,如果您真的需要使用更新版本的 Go,您始终可以启动 Compute Engine 服务器,但您会失去标准或弹性环境的所有便利,例如自动缩放。

编辑:截至 2017 年 6 月 27 日,他们已在 SDK 中启用 Go 1.8 作为测试版。请在此处查看发行说明中的​​信息:https://cloud.google.com/appengine/docs/standard/go/release-notes

June 27, 2017

Go runtime notes

Updated Go SDK to version 1.9.55 Enable the Go 1.8 beta This release adds beta support for go1.8. To use Go 1.8, set api_version: go1.8 in your app.yaml configuration file. You must also use App Engine SDK, not Cloud SDK. To download the App Engine SDK, go to the Downloads page and at the bottom of the page, expand the Or, you can download the original App Engine SDK for Go section.

但请注意,即使到 2017 年 10 月 3 日,他们仍然称其为 1.8 beta。

October 3, 2017

Updated Go SDK to 1.9.59 Fixed bug in dev_appserver.py which used incorrect build constraints for the Go 1.8 beta.

EDIT2:稍加修改后,如果 goapp version 仍然打印 1.6.4,请不要 panic ,它默认为这个。您必须位于包含 app.yamlapi_version: go1.8 的目录中,否则它不会显示。基本目录中的 goapp 是一个脚本,用于解析 app.yaml 以确定使用哪个版本。

关于google-app-engine - dev_appserver 使用 goroot 1.6 而不是 1.8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46694813/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com