diff --git a/ginext/funcWrapper.go b/ginext/funcWrapper.go index 83ba5c4..8443bfe 100644 --- a/ginext/funcWrapper.go +++ b/ginext/funcWrapper.go @@ -104,3 +104,17 @@ func WrapHTTPHandlerFunc(w *GinWrapper, fn http.HandlerFunc) gin.HandlerFunc { } } } + +func WrapExtHTTPHandlerFunc(w *GinWrapper, fn func(*gin.Context, http.ResponseWriter, *http.Request)) gin.HandlerFunc { + return func(g *gin.Context) { + for _, lstr := range w.listenerBeforeRequest { + lstr(g) + } + + fn(g, g.Writer, g.Request) + + for _, lstr := range w.listenerAfterRequest { + lstr(g, nil) + } + } +} diff --git a/goextVersion.go b/goextVersion.go index 189dbe8..7bea854 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.626" +const GoextVersion = "0.0.627" -const GoextVersionTimestamp = "2026-03-14T00:50:15+0100" +const GoextVersionTimestamp = "2026-03-14T01:13:07+0100"