AddSQLNullBoolKeyOmitEmpty 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)
| 323 | // AddSQLNullBoolKeyOmitEmpty adds a string to be encoded or skips it if it is zero value. |
| 324 | // Must be used inside an object as it will encode a key |
| 325 | func (enc *Encoder) AddSQLNullBoolKeyOmitEmpty(key string, v *sql.NullBool) { |
| 326 | if v != nil && v.Valid && v.Bool != false { |
| 327 | enc.BoolKeyOmitEmpty(key, v.Bool) |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | // AddSQLNullBoolKeyNullEmpty adds a string to be encoded or skips it if it is zero value. |
| 332 | // Must be used inside an object as it will encode a key |