SQLNullBoolKeyOmitEmpty adds a string to be encoded or skips it if it is zero value. Must be used inside an object as it will encode a key
(key string, v *sql.NullBool)
| 363 | // SQLNullBoolKeyOmitEmpty adds a string to be encoded or skips it if it is zero value. |
| 364 | // Must be used inside an object as it will encode a key |
| 365 | func (enc *Encoder) SQLNullBoolKeyOmitEmpty(key string, v *sql.NullBool) { |
| 366 | if v != nil && v.Valid && v.Bool != false { |
| 367 | enc.BoolKeyOmitEmpty(key, v.Bool) |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | // SQLNullBoolKeyNullEmpty adds a string to be encoded or skips it if it is zero value. |
| 372 | // Must be used inside an object as it will encode a key |