I just trying to get data from a datasbe table with sime fields null. This data will be convert to json after read.
I created 3 vars to be fill with table data
var (
item customerInformationOutput
state sql.NullString
confirmationDelay sql.NullInt64
linkedTo sql.NullString
)
But golang compiler show the lines where sql.NullXXX is used marked as error with message
services\getcustomerinformation.go:122:25: sql.NullString undefined (type string has no field or method NullString)
services\getcustomerinformation.go:123:25: sql.NullInt64 undefined (type string has no field or method NullInt64)
services\getcustomerinformation.go:124:25: sql.NullString undefined (type string has no field or method NullString)
I have the corresponding import “database/sql” and in another source I have the same usage without problem…
Any idea what I have to check ?
TIA,
Yamil