Accoding to doc…
For a Timer created with NewTimer, Reset should be invoked only on stopped or expired timers with drained channels.
If a program has already received a value from t.C, the timer is known to have expired and the channel drained, so t.Reset can be used directly. If a program has not yet received a value from t.C, however, the timer must be stopped and—if Stop reports that the timer expired before being stopped—the channel explicitly drained.
Why is it necessary to call reset only on expired or stopped timers? Can anyone give an example of what kind of issue/errors could arise if this is not done.
I am trying to identify id this situation would cause an runtime error : invalid memory address error. However when I am trying out this code I do not see any issue.
https://go.dev/play/p/mGUR__gjA_D
So, I am trying to identify why we should make sure timer is stopped or expired.