quick implementation of middleware

This commit is contained in:
luke.rodham
2018-03-12 10:08:30 +00:00
parent 6740568afb
commit 1e787689aa
12 changed files with 187 additions and 84 deletions
+1 -2
View File
@@ -37,8 +37,7 @@ func Test_Static_Route_Creation(t *testing.T) {
func Test_Prefix_Route_Creation(t *testing.T) {
r := require.New(t)
router := tuu.NewRouter()
router.Prefix("/prefix/")
router := tuu.NewRouter(tuu.RouterPrefix("/prefix"))
router.GET("/home", func(ctx tuu.Context) error { return nil })
router.GET("/home/about-us/", func(ctx tuu.Context) error { return nil })