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

Method executeOnNameHooks

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

Source from the content-addressed store, hash-verified

346}
347
348func (h *Hooks) executeOnNameHooks(route *Route) error {
349 if route == nil {
350 return nil
351 }
352
353 cloned := *route
354
355 // Check mounting
356 if h.app.mountFields.mountPath != "" {
357 cloned.path = h.app.mountFields.mountPath + cloned.path
358 cloned.Path = cloned.path
359 }
360
361 for _, v := range h.onName {
362 if err := v(cloned); err != nil {
363 return err
364 }
365 }
366
367 return nil
368}
369
370func (h *Hooks) executeOnGroupHooks(group Group) error {
371 // Check mounting

Callers 2

NameMethod · 0.80

Calls

no outgoing calls

Tested by 1