add debug route
This commit is contained in:
parent
608d0a6c20
commit
52c70662a7
1 changed files with 6 additions and 0 deletions
|
|
@ -146,6 +146,12 @@ func (s *Server) createHandler() {
|
|||
json.NewEncoder(w).Encode(map[string]string{"message": fmt.Sprintf("path %s are not exits", r.RequestURI)})
|
||||
})
|
||||
|
||||
// display all routes [DEBUG]
|
||||
chi.Walk(r, func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error {
|
||||
fmt.Println(method, " ---> ", route)
|
||||
return nil
|
||||
})
|
||||
|
||||
s.server.Handler = r
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue