router := httprouter.New()
router.GET("/search/", func1)
router.GET("/support/", func2)
router.GET("/blog/:post/", func3)
router.GET("/about-us/", func4)
router.GET("/about-us/team/", func5)
router.GET("/contact/", func6)
路由树:
Priority Path Handle
9 \ *<1>
3 !s nil
2 |!earch\ *<2>
1 |"upport\ *<3>
2 !blog\ *<4>
1 | ":post nil
1 | "\ *<5>
2 !about-us\ *<6>
1 | "team\ *<7>
1 "contact\ *<8>