I am trying to upload a Go app to appegnine Go 1.12 runtime. My main pkg is under a cmd
folder as shows https://cloud.google.com/appengine/docs/standard/go112/config/appref#runtime_and_app_elements
But if I try any of the approaches outlines in the official docs, I get the following error:
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
The problem seems to be that I am not allowed to use -
in the main
entry in app.yaml. Why is that? Can this be fixed?
I am using
$ 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