From 37dcbba77304a9175297c91aba90ac3823df2011 Mon Sep 17 00:00:00 2001 From: lijiandong_dr Date: Mon, 9 Dec 2024 17:02:58 +0800 Subject: [PATCH] modify db.Query return err --- modules/db/performer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/db/performer.go b/modules/db/performer.go index da70f4d88..400f7635c 100644 --- a/modules/db/performer.go +++ b/modules/db/performer.go @@ -17,7 +17,7 @@ func CommonQuery(db *sql.DB, query string, args ...interface{}) ([]map[string]in rs, err := db.Query(query, args...) if err != nil { - panic(err) + return nil, err } defer func() {