func handler(f func(c common.Context)) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { c := common.Context{ Context: appengine.NewContext(r), Req: r, Resp: w, Vars: mux.Vars(r), } c.User = user.Current(c) c.Version = appengine.VersionID(c.Context) f(c) } }