(route *Route)
| 324 | } |
| 325 | |
| 326 | func (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 | |
| 348 | func (h *Hooks) executeOnNameHooks(route *Route) error { |
| 349 | if route == nil { |
no outgoing calls