adds ability to set an env in the app context

This commit is contained in:
2018-01-04 07:32:15 +00:00
parent 95400f4e69
commit 2d05e42555
7 changed files with 26 additions and 11 deletions
+5
View File
@@ -15,12 +15,17 @@ type DefaultRouter struct {
StaticRoutes []*StaticRoute
prefix string
env string
}
func (r *DefaultRouter) Prefix(path string) {
r.prefix = path
}
func (r *DefaultRouter) SetEnv(env string) {
r.env = env
}
func (r *DefaultRouter) GET(path string, h Handler) {
r.addRoute(http.MethodGet, path, h)
}