MCPcopy Create free account
hub / github.com/cloudwan/gohan / fillInContext

Function fillInContext

extension/gohanscript/lib/httpserver.go:54–62  ·  view source on GitHub ↗
(context middleware.Context,
	r *http.Request, w http.ResponseWriter, p martini.Params)

Source from the content-addressed store, hash-verified

52}
53
54func 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
64func httpServer(stmt *gohanscript.Stmt) (func(*gohanscript.Context) (interface{}, error), error) {
65 return func(globalContext *gohanscript.Context) (interface{}, error) {

Callers 1

httpServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected