使用Go的App脚本AppEngine教程

On the tutorial for Apps Script/Appengine:

https://developers.google.com/apps-script/articles/appengine

When trying to run google_appengine/dev_appserver.py google-apps-script/ the response is:

WARNING  2012-09-06 14:56:33,570 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
INFO     2012-09-06 14:56:33,840 appengine_rpc.py:163] Server: appengine.google.com
CRITICAL 2012-09-06 14:56:33,842 appcfg.py:561] The api_version specified in app.yaml (1) is not supported by this release of the SDK.  The supported api_versions are ['3', 'go1'].

I have tried the following app.yaml, but it doesn't work.

application: google-apps-script-tutorial
version: 1
runtime: go
api_version: go1

handlers:
- url: /*
  script: _go_app

Also with - url: /rpc and it doesn't work. Since the code is Python is it possible to get App script and Go linked up in app engine?

The code for that tutorial is in Python and Javascript. If you want to use the go runtime, you will have to rewrite the Python portion in Go.

That example demonstrates the use of a Google Apps Script frontend with a Google App Engine (GAE) backend written in Python. GAE currently runs apps written in Java, Python, Go and PHP.

That particular Python backend accepts and produces messages in JSON format. Therefore, to link Apps Script and Go similarly, using GAE or not, you would need to replicate the functionality of the Python backend using, probably, the net/http library and the encoding/json library.

For examples of using these libraries together, have a look at this, this and this.

For examples on using Go with GAE, have a look at this and this.

Hope that helps.