From ed23b443c17d2b0c88bcfc32e4a2c6fbbf7b6927 Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Thu, 21 Nov 2024 13:23:17 -0800 Subject: [PATCH] clean up main.go to not use runErr --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index edceff6..4534af5 100644 --- a/main.go +++ b/main.go @@ -44,12 +44,11 @@ func main() { r.GET("/login", pages.Login) r.GET("/welcome", pages.Welcome) r.GET("/goals", pages.Goals) - // post routes r.POST("/goals", pages.CreateGoal) - runErr := r.Run(":8080") + err = r.Run(":8080") - if runErr != nil { - panic(runErr) + if err != nil { + panic(err) } }