From f3f9142f0a334fd36c6143b874c608ab742e3edd Mon Sep 17 00:00:00 2001 From: Finn Herzfeld Date: Tue, 8 Jan 2019 14:15:04 -0800 Subject: [PATCH] i put the panic() in the wrong side of the if lol --- testhelper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testhelper.go b/testhelper.go index 704bb02..a069ab4 100644 --- a/testhelper.go +++ b/testhelper.go @@ -26,10 +26,9 @@ func main() { err := db.QueryRow("SELECT verification_code FROM pending_accounts WHERE number = $1", account).Scan(&code) log.Printf("Looking for verification code for %s", account) if err != nil { - fmt.Fprintf(w, "An error occured: %s\n", err) + panic(err) } else { fmt.Fprintf(w, "%s\n", code) - panic(err) } })