Created
April 19, 2025 15:01
-
-
Save alexedwards/fa29a1f834e1ad9e60cba27e9e6ef76d to your computer and use it in GitHub Desktop.
This file contains 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
mux := http.NewServeMux() | |
mux.Handle("/", recoverMiddleware(requestIDMiddleware(loggingMiddleware(http.HandlerFunc(homeHandler))))) | |
mux.Handle("/about", recoverMiddleware(requestIDMiddleware(loggingMiddleware(http.HandlerFunc(aboutHandler))))) | |
mux.Handle("/admin", recoverMiddleware(requestIDMiddleware(loggingMiddleware(authenticationMiddleware(adminRoleCheckMiddleware(http.HandlerFunc(adminDashboardHandler))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment