Last active
July 5, 2018 21:03
-
-
Save papisz/001cfd6b95ca77bfd5a054e176f298fe to your computer and use it in GitHub Desktop.
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
// BAD EXAMPLE, doesn't work! | |
r := chi.NewRouter() | |
r.With(petMiddleware).Route("/pets", func(r chi.Router) { | |
r.Route("/{pet}", func(r chi.Router) { | |
r.Get("/", getPetHandler) | |
r.Put("/", putPetHandler) | |
}) | |
}) | |
http.ListenAndServe(":8000", r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment