Created
March 16, 2018 13:31
-
-
Save rpromyshlennikov/41e2185ac6a1ceff5189bd29a227ab6e to your computer and use it in GitHub Desktop.
Gorilla mux router walk function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.Walk( | |
func(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error { | |
fmt.Println(route.GetPathRegexp()) | |
fmt.Println(route.GetHostTemplate()) | |
fmt.Println(route.GetPathTemplate()) | |
fmt.Println(route.GetMethods()) | |
return nil | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment