Change function name to ProcessGroup

This commit is contained in:
Maximilian 2023-07-21 16:26:43 -05:00
parent bada24884a
commit eb36156c52

View File

@ -2,10 +2,10 @@ package middleware
import "net/http" import "net/http"
// ProcessMiddleware is a wrapper function for the http.HandleFunc function // ProcessGroup is a wrapper function for the http.HandleFunc function
// that takes the function you want to execute (f) and the middleware you want // that takes the function you want to execute (f) and the middleware you want
// to execute (m) this should be used when processing multiple groups of middleware at a time // to execute (m) this should be used when processing multiple groups of middleware at a time
func ProcessMiddleware(f func(w http.ResponseWriter, r *http.Request), m []func()) func(w http.ResponseWriter, r *http.Request) { func ProcessGroup(f func(w http.ResponseWriter, r *http.Request), m []func()) func(w http.ResponseWriter, r *http.Request) {
for _, middleware := range m { for _, middleware := range m {
middleware() middleware()
} }