modxevil / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

Docs incorrect for Golang Managed VMs #464

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When launching a managed VM with Go appengine SDK 1.9.30, the http handlers 
should be registered when inited in the main() function per the docs at 
https://cloud.google.com/appengine/docs/go/managed-vms/. 

There it states replace init() with main(), but that doesn't work. Keeping it 
as init() does work, though, if adding the appengine.Main() call. This is super 
confusing and has resulted in a lot of wasted time.

Google Cloud SDK [91.0.1] Platform: [Linux, x86_64] Python Version: [2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]] Python Location: [/usr/bin/python2] Installed Components: core: [2015.12.16] app-engine-python: [1.9.30] core-nix: [2015.11.24] pubsub-emulator: [2015.12.07] kubectl: [] gcloud: [] gsutil-nix: [4.15] beta: [2015.10.08] gsutil: [4.16] bq: [2.0.18] alpha: [2015.10.08] gcd-emulator: [v1beta3-1.0.0] kubectl-linux-x86_64: [1.1.2] bq-nix: [2.0.18]


Output of $ goapp version

go version go1.4.2 (appengine-1.9.30) linux/amd64

Original issue reported on code.google.com by bradley....@gmail.com on 8 Jan 2016 at 3:33

GoogleCodeExporter commented 8 years ago
Hi, Thank you for the feedback. We will take another look at this page and 
clarify/correct the content as required. 

Original comment by vil...@google.com on 14 Jan 2016 at 4:33

GoogleCodeExporter commented 8 years ago
Hi - just wanted to clarify how you encountered the issue. Were you migrating 
an existing app to the Managed VMs environment? This is when you should replace 
init() with main().

We can make the documentation clearer that this replacement should only be done 
when migrating an existing app, but wanted to confirm the situation. 

Original comment by leecarol...@google.com on 19 Jan 2016 at 10:24

GoogleCodeExporter commented 8 years ago
Exactly, it was when migrating an existing app.

Original comment by bradley....@gmail.com on 20 Jan 2016 at 12:18