Skip to content

Commit

Permalink
doc(lifecycle.go): fix examples (#1256)
Browse files Browse the repository at this point in the history
Fix function defined in documentation for `StartHook` and `StopHook` to
match the reset of the example.
  • Loading branch information
jkanywhere authored Jan 9, 2025
1 parent 7eebf3c commit 928af08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type Hook struct {
// StartHook returns a new Hook with start as its [Hook.OnStart] function,
// wrapping its signature as needed. For example, given the following function:
//
// func myhook() {
// func myfunc() {
// fmt.Println("hook called")
// }
//
Expand Down Expand Up @@ -86,7 +86,7 @@ func StartHook[T HookFunc](start T) Hook {
// StopHook returns a new Hook with stop as its [Hook.OnStop] function,
// wrapping its signature as needed. For example, given the following function:
//
// func myhook() {
// func myfunc() {
// fmt.Println("hook called")
// }
//
Expand Down

0 comments on commit 928af08

Please sign in to comment.