1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00
Former-commit-id: d8dd7c426dc9f14c870f103fef703595a2915612
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-01-20 05:17:31 +02:00
parent a4ff39df65
commit e176ff7b0c
15 changed files with 384 additions and 24 deletions

View File

@@ -114,13 +114,13 @@ type WrapperFunc func(w http.ResponseWriter, r *http.Request, firstNextIsTheRout
//
// Before build.
func (router *Router) WrapRouter(wrapperFunc WrapperFunc) {
router.mu.Lock()
defer router.mu.Unlock()
if wrapperFunc == nil {
return
}
router.mu.Lock()
defer router.mu.Unlock()
if router.wrapperFunc != nil {
// wrap into one function, from bottom to top, end to begin.
nextWrapper := wrapperFunc