From 11651ea6640b3e3cb5f2495c4ff99246453e3fa4 Mon Sep 17 00:00:00 2001 From: what Date: Mon, 31 Jul 2023 20:53:24 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E4=B8=B0=E5=AF=8C=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scan.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan.go b/scan.go index 5da2857..f8b35e7 100644 --- a/scan.go +++ b/scan.go @@ -141,7 +141,7 @@ func sStructSlice(rows *sql.Rows, dest any) (result RowScan) { if data := *scanArgs[i].(*[]uint8); len(data) > 0 { v := rv.Addr().Interface() if err := json.Unmarshal(data, &v); err != nil { - panic(fmt.Sprintf("[%s:%s:%s] => %s", lo.Must1(lo.FindKey(keys, i)), rv.Kind(), data, err)) + panic(fmt.Sprintf("[%s:%s:%s] => %s", lo.Must1(lo.FindKey(keys, i)), rv.Kind(), scanArgs[i], err)) } } } @@ -215,7 +215,7 @@ func sStruct(rows *sql.Rows, dest any) (result RowScan) { if data := *scanArgs[i].(*[]uint8); len(data) > 0 { v := rv.Addr().Interface() if err := json.Unmarshal(data, &v); err != nil { - panic(fmt.Sprintf("[%s:%s:%s] => %s", lo.Must1(lo.FindKey(keys, i)), rv.Kind(), data, err)) + panic(fmt.Sprintf("[%s:%s:%s] => %s", lo.Must1(lo.FindKey(keys, i)), rv.Kind(), scanArgs[i], err)) } } }