News for hackers. Stuff that matters.
Re:3.5 Years, 500k Lines of Go by zalmoxes on Friday March 24, 2017 @10:32AM (#13949105)
It really depends. You might want to test something that requires days/weeks expiration.

I would agree that the Clock interface is a bit large. In personal projects I prefer to just have something simple like timer func() time.Time

Re:3.5 Years, 500k Lines of Go by weberc2 on Friday March 24, 2017 @11:13AM (#13949416)
I don't understand your argument. What's special about a days/weeks that would prevent you from shortening this value for your tests? In other words, if I want to test my timeout logic, it should be independent of the timeout value, so I should be free to use a shorter timeout value in my timeout tests.