MCPcopy
hub / github.com/gofiber/fiber / executeOnRouteHooks

Method executeOnRouteHooks

hooks.go:326–346  ·  view source on GitHub ↗
(route *Route)

Source from the content-addressed store, hash-verified

324}
325
326func (h *Hooks) executeOnRouteHooks(route *Route) error {
327 if route == nil {
328 return nil
329 }
330
331 cloned := *route
332
333 // Check mounting
334 if h.app.mountFields.mountPath != "" {
335 cloned.path = h.app.mountFields.mountPath + cloned.path
336 cloned.Path = cloned.path
337 }
338
339 for _, v := range h.onRoute {
340 if err := v(cloned); err != nil {
341 return err
342 }
343 }
344
345 return nil
346}
347
348func (h *Hooks) executeOnNameHooks(route *Route) error {
349 if route == nil {

Callers 3

addRouteMethod · 0.80

Calls

no outgoing calls

Tested by 1