Created
October 3, 2018 20:26
-
-
Save Alir3z4/3557d3a78932992d705f0580647c74a4 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 Notify(logger *log.Logger) Adapter { | |
return func(h http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
logger.Println("before") | |
defer logger.Println("after") | |
h.ServeHTTP(w, r) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment