OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting.
(handler ...OnMountHandler)
| 318 | // The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. |
| 319 | // It works for app and group mounting. |
| 320 | func (h *Hooks) OnMount(handler ...OnMountHandler) { |
| 321 | h.app.mutex.Lock() |
| 322 | h.onMount = append(h.onMount, handler...) |
| 323 | h.app.mutex.Unlock() |
| 324 | } |
| 325 | |
| 326 | func (h *Hooks) executeOnRouteHooks(route *Route) error { |
| 327 | if route == nil { |