Created
July 4, 2017 19:47
-
-
Save harwoeck/be9058997622440be2cb16e2bd9dec06 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
func WrapperHandler(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) { | |
return func(w http.ResponseWriter, r *http.Request) { | |
handler(w, r) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http.HandleFunc("/dashboard/admin/", wrapperHandler(handlerDashboardAdmin))