fixed dep verisons for uuid. finished passing env around

This commit is contained in:
luke.rodham
2018-01-04 10:59:03 +00:00
parent 558e986a0f
commit 1e57ce3d8d
4 changed files with 46 additions and 63 deletions
+7 -5
View File
@@ -1,23 +1,25 @@
package tuu
import (
"github.com/gorilla/mux"
"net/http"
"github.com/gorilla/mux"
gcontext "github.com/gorilla/context"
)
type Route struct {
Method string
Path string
Handler Handler
Method string
Path string
Handler Handler
MuxHandler mux.Route
Env string
}
func (r *Route) ServeHTTP(res http.ResponseWriter, req *http.Request) {
defer gcontext.Clear(req)
c := NewContext(*r, res, req)
c := NewContext(*r, res, req, r.Env)
if err := r.Handler(c); err != nil {
c.Response().WriteHeader(500)