You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to Every. 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.
err is returned non-nil, or otherwise behavior for negative Duration is documented on the Every 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:
husam-e
changed the title
[BUG] - Handling negative time.Duration as Every param for interval
[BUG] - Handling negative time.Duration as interval param to Every func
Oct 26, 2023
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: