gae go helloworld

ソース

package app

import (
    "fmt"
    "net/http"
)

func init() {
    http.HandleFunc("/", handler)
}

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(w, "Hello, world!")
}

app.yaml

application: {アプリケーション名}
version: 1
runtime: go
api_version: go1.8

handlers:
- url: /.*
  script: _go_app