1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-07-03 00:36:52 +02:00

CSVColParser: correctly set nil values in Rows

This commit is contained in:
Ivo Gosemann
2023-08-09 17:19:35 +02:00
parent 3476f31d8f
commit fd971def42
2 changed files with 7 additions and 3 deletions

View File

@ -15,7 +15,7 @@ const invalidate = "☠☠☠ MEMORY OVERWRITTEN ☠☠☠ "
// CSVColumnParser is a function which converts trimmed csv
// column string to a []byte representation. Currently
// transforms NULL to nil
var CSVColumnParser = func(s string) []byte {
var CSVColumnParser = func(s string) interface{} {
switch {
case strings.ToLower(s) == "null":
return nil