OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter. WARN: OnGroupName only works with naming groups, not routes.
(handler ...OnGroupNameHandler)
| 267 | // |
| 268 | // WARN: OnGroupName only works with naming groups, not routes. |
| 269 | func (h *Hooks) OnGroupName(handler ...OnGroupNameHandler) { |
| 270 | h.app.mutex.Lock() |
| 271 | h.onGroupName = append(h.onGroupName, handler...) |
| 272 | h.app.mutex.Unlock() |
| 273 | } |
| 274 | |
| 275 | // OnListen is a hook to execute user functions on Listen or Listener. |
| 276 | func (h *Hooks) OnListen(handler ...OnListenHandler) { |