How to get all routes registered at runtime?
Comment From: widnyana
first, I will define all the route, then register all defined route, with this route registration func
did you look for something like that, @xpbliss ?
Comment From: xpbliss
good!
Comment From: javierprovecho
@widnyana thank you!
@xpbliss reopen if you had any more questions about this.
Comment From: adrian-moisa
Any answer for this question?
Comment From: abrar71
You can all the routes using router.Routes() and loop through the array to get .Method and .Path of each registered route
for _, item := range router.Routes() {
println("method:", item.Method, "path:", item.Path)
}