Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Doc: typo in hooks documentation #3164

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading