What you want to do is not possible according to the oracle go driver docs:
sql.NullString is not supported: Oracle DB does not differentiate between an empty string ("") and a NULL
Need more details on the SQL database type you are connecting to. I know the go SQLite3 pkg -
github.com/mattn/go-sqlite3 - supports setting
nil for values of type
Check the details of the driver you are using to connect to the database. For instance with MySQL, getting SQL date fields into go's native
time.Time struct type is not set by default - it must be turned on at the driver level.