scanNullString returns empty string for NULL columns.
(ns sql.NullString)
| 94 | |
| 95 | // scanNullString returns empty string for NULL columns. |
| 96 | func scanNullString(ns sql.NullString) string { |
| 97 | if ns.Valid { |
| 98 | return ns.String |
| 99 | } |
| 100 | return "" |
| 101 | } |
| 102 | |
| 103 | // scanNullBool returns nil for NULL, pointer to bool otherwise. |
| 104 | func scanNullBool(nb sql.NullBool) *bool { |
no outgoing calls
no test coverage detected