我正在尝试将 Go 应用程序上传到 appegnine Go 1.12 运行时。我的主要 pkg 在一个cmd
文件夹下,如图所示https://cloud.google.com/appengine/docs/standard/go112/config/appref#runtime_and_app_elements
但是,如果我尝试官方文档中概述的任何方法,我会收到以下错误:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/tamal/go/src/kmodules.xyz/resource-metadata/app.yaml]
Unable to assign value './cmd/resource-metadata-server' to attribute 'main':
Value './cmd/resource-metadata-server' for main does not match expression '^(?:[\w.\\\/:]+)$'
in "/home/tamal/go/src/kmodules.xyz/resource-metadata/app.yaml", line 3, column 7
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/tamal/go/src/kmodules.xyz/resource-metadata/app.yaml]
Unable to assign value 'kmodules.xyz/resource-metadata/cmd/resource-metadata-server' to attribute 'main':
Value 'kmodules.xyz/resource-metadata/cmd/resource-metadata-server' for main does not match expression '^(?:[\w.\\\/:]+)$'
in "/home/tamal/go/src/kmodules.xyz/resource-metadata/app.yaml", line 2, column 7
问题似乎是我不允许在 app.yaml-
的条目中使用。main
这是为什么?这可以解决吗?
我在用
$ gcloud version
Google Cloud SDK 257.0.0
app-engine-go
app-engine-python 1.9.86
beta 2019.05.17
bq 2.0.46
cloud-datastore-emulator 2.1.0
core 2019.08.02
gsutil 4.41