【发布时间】:2016-03-20 12:48:53
【问题描述】:
根据文档,您只需将它们包含在 app.yaml 文件中 https://cloud.google.com/appengine/docs/go/config/appconfig#Go_app_yaml_Defining_environment_variables
所以我这样做了:
env_variables:
DEVDOT_OAUTH_CLIENT_ID: 'xxxxx'
DEVDOT_OAUTH_CLIENT_SECRET: 'xxxxxx'
但是当我的应用程序运行时,它没有得到这些值。我在 MVM 运行时上运行,所以我删除了我的 init() 函数并尝试从 main() 和我分配给 /_ah/start 路径的处理程序调用 os.Getenv()。
有什么想法吗?
【问题讨论】:
标签: google-app-engine go google-cloud-platform