DurationOpt is an option type for time.Duration that uses a pointer. This allows us to get nil values outside, instead of defaulting to 0
| 27 | // DurationOpt is an option type for time.Duration that uses a pointer. This |
| 28 | // allows us to get nil values outside, instead of defaulting to 0 |
| 29 | type DurationOpt struct { |
| 30 | value *time.Duration |
| 31 | } |
| 32 | |
| 33 | // NewDurationOpt creates a DurationOpt with the specified duration |
| 34 | func NewDurationOpt(value *time.Duration) *DurationOpt { |
nothing calls this directly
no outgoing calls
no test coverage detected