fix: get string value from sql.NullString

absences v0.4.0
William Perron 2 years ago
parent 5793278523
commit 0497f10e9c

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

Loading…
Cancel
Save