Skip to content

Instantly share code, notes, and snippets.

@j1cs
Created October 6, 2023 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1cs/cfc587bd1e92ffa05f9eaa5c052768e1 to your computer and use it in GitHub Desktop.
Save j1cs/cfc587bd1e92ffa05f9eaa5c052768e1 to your computer and use it in GitHub Desktop.
chi walk
chi.Walk(r, func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error {
fmt.Printf("[%s]: '%s' has %d middlewares\n", method, route, len(middlewares))
return nil
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment