v0.0.348 added listener and options to goext
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m35s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m35s
This commit is contained in:
@@ -20,6 +20,10 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc {
|
||||
persistantData: &preContextData{},
|
||||
}
|
||||
|
||||
for _, lstr := range w.listenerBeforeRequest {
|
||||
lstr(g)
|
||||
}
|
||||
|
||||
wrap, stackTrace, panicObj := callPanicSafe(fn, pctx)
|
||||
if panicObj != nil {
|
||||
|
||||
@@ -45,6 +49,10 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
for _, lstr := range w.listenerAfterRequest {
|
||||
lstr(g, wrap)
|
||||
}
|
||||
|
||||
if reqctx.Err() == nil {
|
||||
wrap.Write(g)
|
||||
}
|
||||
|
Reference in New Issue
Block a user