Boolp constructs a field that carries a *bool. The returned Field will safely and explicitly represent `nil` when appropriate.
(key string, val *bool)
| 71 | // Boolp constructs a field that carries a *bool. The returned Field will safely |
| 72 | // and explicitly represent `nil` when appropriate. |
| 73 | func Boolp(key string, val *bool) Field { |
| 74 | if val == nil { |
| 75 | return nilField(key) |
| 76 | } |
| 77 | return Bool(key, *val) |
| 78 | } |
| 79 | |
| 80 | // ByteString constructs a field that carries UTF-8 encoded text as a []byte. |
| 81 | // To log opaque binary blobs (which aren't necessarily valid UTF-8), use |