Created
November 30, 2018 16:39
-
-
Save Bebbolus/f69df617fb50eadd8a74ae4f4d900261 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 Chain(f http.HandlerFunc, mids ...middleware) http.HandlerFunc { | |
for _, m := range mids { | |
f = m(f) | |
} | |
return f | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment