[BUG] - Handling negative time.Duration as interval param to Every
func
#600
Labels
bug
Something isn't working
8000
Every
func
#600
Describe the bug
Not sure if this is a bug, more of a question to confirm expected behavior: currently no error is returned when a negative
time.Duration
is provided as the interval param toEvery
. Is that intentional? Should it not return an error and fail fast, similar to when providing a negative int? Not clear to me what the intended behavior is for that.To Reproduce
Steps to reproduce the behavior:
Version
v1.35.2
Expected behavior
err
is returned non-nil, or otherwise behavior for negative Duration is documented on theEvery
function.Additional context
Thinking it would be helpful as input validation to get an error in this scenario to immediately recognize invalid setup, just like how negative int values are treated as errors.
The text was updated successfully, but these errors were encountered: