(context middleware.Context, r *http.Request, w http.ResponseWriter, p martini.Params)
| 52 | } |
| 53 | |
| 54 | func fillInContext(context middleware.Context, |
| 55 | r *http.Request, w http.ResponseWriter, p martini.Params) { |
| 56 | context["path"] = r.URL.Path |
| 57 | context["http_request"] = r |
| 58 | context["http_response"] = w |
| 59 | context["params"] = p |
| 60 | context["host"] = r.Host |
| 61 | context["method"] = r.Method |
| 62 | } |
| 63 | |
| 64 | func httpServer(stmt *gohanscript.Stmt) (func(*gohanscript.Context) (interface{}, error), error) { |
| 65 | return func(globalContext *gohanscript.Context) (interface{}, error) { |