package tile import ( "fmt" "net/http" "time" "appengine" "appengine/datastore" ) type Tile struct { Created time.Time } func init() { http.HandleFunc("/", handleRoolPath) } func handleRoolPath(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) key := datastore.NewKey(ctx, "Tile", "root", 0, nil) tile := new(Tile) if err := datastore.Get(ctx, key, tile); err != nil { now := new time.Time() tile.Created = now } fmt.Fprint(w, "Root slash " +tile.Created.String()) }