From 7f30a1f8f0f30cb0dbaebeeda3300477187c5bc7 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 10 Mar 2024 13:31:25 +0800 Subject: [PATCH] fix: improve error handling and test robustness - Add error handling to the `router.Run()` call in `example.go` with a panic if an error occurs Signed-off-by: Bo-Yi Wu --- _examples/example.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_examples/example.go b/_examples/example.go index e57303c..5ff74ac 100644 --- a/_examples/example.go +++ b/_examples/example.go @@ -25,5 +25,8 @@ func main() { }, MaxAge: 12 * time.Hour, })) - router.Run() + + if err := router.Run(); err != nil { + panic(err) + } }