Skip to content

Add duration support

I think having more types supported would be a benefit. Currently I have to write boilerplate code, when I want to define duration in envars.

This MR adds first-party support for time.Duration

=== RUN   TestDuration
=== RUN   TestDuration/defined_not_duration
=== RUN   TestDuration/defined_yes_duration
=== RUN   TestDuration/defined_yes_duration_2
=== RUN   TestDuration/defined_but_empty
=== RUN   TestDuration/undefined
--- PASS: TestDuration (0.00s)
    --- PASS: TestDuration/defined_not_duration (0.00s)
    --- PASS: TestDuration/defined_yes_duration (0.00s)
    --- PASS: TestDuration/defined_yes_duration_2 (0.00s)
    --- PASS: TestDuration/defined_but_empty (0.00s)
    --- PASS: TestDuration/undefined (0.00s)
PASS

Merge request reports

Loading