From 4dcbbaa2269882c9aa0462f970a40abfe567ee43 Mon Sep 17 00:00:00 2001 From: William Perron Date: Fri, 23 Sep 2022 11:28:31 +0000 Subject: [PATCH] fix lint --- fmt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fmt.go b/fmt.go index a747f13..4f94156 100644 --- a/fmt.go +++ b/fmt.go @@ -31,7 +31,10 @@ func FormatRows(rows *sql.Rows) (string, error) { for i := range row { row[i] = new(string) } - rows.Scan(row...) + if err := rows.Scan(row...); err != nil { + return "", fmt.Errorf("failed to scan next row: %w", err) + } + scanned = append(scanned, row) // keep track of row for later for i, a := range row { s := a.(*string)