fix: typo in hooks documentation

pull/3164/head
Santiago Diaz 2024-10-11 22:56:05 -03:00 committed by GitHub
parent 079d301c50
commit 72e97c555d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ type OnMountHandler = func(*App) error
## OnRoute ## OnRoute
OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by **route** parameter. OnRoute is a hook to execute user functions on each route registration. Also you can get route properties by **route** parameter.
```go title="Signature" ```go title="Signature"
func (h *Hooks) OnRoute(handler ...OnRouteHandler) func (h *Hooks) OnRoute(handler ...OnRouteHandler)
@ -104,7 +104,7 @@ func main() {
## OnGroup ## OnGroup
OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by **group** parameter. OnGroup is a hook to execute user functions on each group registration. Also you can get group properties by **group** parameter.
```go title="Signature" ```go title="Signature"
func (h *Hooks) OnGroup(handler ...OnGroupHandler) func (h *Hooks) OnGroup(handler ...OnGroupHandler)

View File

@ -53,7 +53,7 @@ func newHooks(app *App) *Hooks {
} }
} }
// OnRoute is a hook to execute user functions on each route registeration. // OnRoute is a hook to execute user functions on each route registration.
// Also you can get route properties by route parameter. // Also you can get route properties by route parameter.
func (h *Hooks) OnRoute(handler ...OnRouteHandler) { func (h *Hooks) OnRoute(handler ...OnRouteHandler) {
h.app.mutex.Lock() h.app.mutex.Lock()
@ -71,7 +71,7 @@ func (h *Hooks) OnName(handler ...OnNameHandler) {
h.app.mutex.Unlock() h.app.mutex.Unlock()
} }
// OnGroup is a hook to execute user functions on each group registeration. // OnGroup is a hook to execute user functions on each group registration.
// Also you can get group properties by group parameter. // Also you can get group properties by group parameter.
func (h *Hooks) OnGroup(handler ...OnGroupHandler) { func (h *Hooks) OnGroup(handler ...OnGroupHandler) {
h.app.mutex.Lock() h.app.mutex.Lock()