Durationp constructs a field that carries a *time.Duration. The returned Field will safely and explicitly represent `nil` when appropriate.
(key string, val *time.Duration)
| 387 | // Durationp constructs a field that carries a *time.Duration. The returned Field will safely |
| 388 | // and explicitly represent `nil` when appropriate. |
| 389 | func Durationp(key string, val *time.Duration) Field { |
| 390 | if val == nil { |
| 391 | return nilField(key) |
| 392 | } |
| 393 | return Duration(key, *val) |
| 394 | } |
| 395 | |
| 396 | // Object constructs a field with the given key and ObjectMarshaler. It |
| 397 | // provides a flexible, but still type-safe and efficient, way to add map- or |