Skip to content

Commit

Permalink
fix: improve error handling and test robustness
Browse files Browse the repository at this point in the history
- Add error handling to the `router.Run()` call in `example.go` with a panic if an error occurs

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Mar 10, 2024
1 parent 90a7c66 commit 7f30a1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ func main() {
},
MaxAge: 12 * time.Hour,
}))
router.Run()

if err := router.Run(); err != nil {
panic(err)
}
}

0 comments on commit 7f30a1f

Please sign in to comment.