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
In the cases where it is necessary for testing, historically (inside Google) gophers have been advised to pass around values such as func() time.Time, or some similar fake-able clock, instead of calling time.Now(). With synctest it seems like a new strategy is to simply rely on the new primitives rather than bothering with that plumbing.
Does the Google Go style guide have an opinion on this?
Reference: golang/go#67434
In the cases where it is necessary for testing, historically (inside Google) gophers have been advised to pass around values such as
func() time.Time
, or some similar fake-able clock, instead of callingtime.Now()
. With synctest it seems like a new strategy is to simply rely on the new primitives rather than bothering with that plumbing.Does the Google Go style guide have an opinion on this?
(@matttproud @gaal)
The text was updated successfully, but these errors were encountered: