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)) } } }