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
With the opportunity to use generics to improve the assert package (#255), we may want to release a new major version. This issue is to discuss and track changes that would require a major version bump, so that we can include all of them when the time is right.
Combine the skip, env, and poll packages into a single new package. These packages are very small, and combining them into a single package should make it easier to use gotest.tools by requiring fewer imports. I'm not sure what to name that package yet. They could be included as part of the assert package, but the names don't read as well.
Replace the golden package with a GoldenFile(t, filename) function in the assert package. assert: golden variables #237 added support for golden-like behaviour using expected values stored in a Go variable. We should be able to do something similar:
Similar to golden variables, when called with -update, assert.Assert should be able to detect that the expected argument is a GoldenFile and use the actual value to update the specified filename.
Maybe icmd could change to use context.Context to set the timeout instead of a time.Duration passed to WaitOnCommand ? Some way to pass a deadline/timeout using context.Context might be good.
Are there other breaking changes we should consider? Anything in fs that could change now that the stdlib has an fs package or because of generics?
With the opportunity to use generics to improve the
assertpackage (#255), we may want to release a new major version. This issue is to discuss and track changes that would require a major version bump, so that we can include all of them when the time is right.Change the signature of the
assert, andassert/cmpfunctions to use generics instead ofanyas the argument types (assert: use type constraints (generics) #255)Combine the
skip,env, andpollpackages into a single new package. These packages are very small, and combining them into a single package should make it easier to usegotest.toolsby requiring fewer imports. I'm not sure what to name that package yet. They could be included as part of theassertpackage, but the names don't read as well.Replace the
goldenpackage with aGoldenFile(t, filename)function in theassertpackage. assert: golden variables #237 added support for golden-like behaviour using expected values stored in a Go variable. We should be able to do something similar:Similar to golden variables, when called with
-update,assert.Assertshould be able to detect that the expected argument is aGoldenFileand use the actual value to update the specified filename.Maybe
icmdcould change to usecontext.Contextto set the timeout instead of atime.Durationpassed toWaitOnCommand? Some way to pass a deadline/timeout usingcontext.Contextmight be good.Are there other breaking changes we should consider? Anything in
fsthat could change now that the stdlib has anfspackage or because of generics?