예제 #1
0
파일: web.go 프로젝트: robban/stockholm-ai
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)
	}
}