mirror of
https://github.com/cubixle/tuu.git
synced 2026-04-30 19:08:41 +01:00
adds ability to set an env in the app context
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user