From 0497f10e9cd756db901d34a40b946df8f2207697 Mon Sep 17 00:00:00 2001 From: William Perron Date: Fri, 23 Sep 2022 14:05:05 +0000 Subject: [PATCH] fix: get string value from sql.NullString --- fmt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmt.go b/fmt.go index 750b523..af4acdc 100644 --- a/fmt.go +++ b/fmt.go @@ -63,7 +63,7 @@ func FormatRows(rows *sql.Rows) (string, error) { curr = curr[:0] // empty slice but preserve capacity for i := range lengths { s := r[i].(*sql.NullString) - curr = append(curr, lengths[i], *s) + curr = append(curr, lengths[i], s.String) } sb.WriteString(fmt.Sprintf(pattern, curr...)) }