Skip to content

Commit

Permalink
fix: typo in hooks documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoBobrik authored Oct 12, 2024
1 parent 079d301 commit 72e97c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type OnMountHandler = func(*App) error

## 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"
func (h *Hooks) OnRoute(handler ...OnRouteHandler)
Expand Down Expand Up @@ -104,7 +104,7 @@ func main() {

## 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"
func (h *Hooks) OnGroup(handler ...OnGroupHandler)
Expand Down
4 changes: 2 additions & 2 deletions hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (h *Hooks) OnRoute(handler ...OnRouteHandler) {
h.app.mutex.Lock()
Expand All @@ -71,7 +71,7 @@ func (h *Hooks) OnName(handler ...OnNameHandler) {
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.
func (h *Hooks) OnGroup(handler ...OnGroupHandler) {
h.app.mutex.Lock()
Expand Down

0 comments on commit 72e97c5

Please sign in to comment.