v1.23.0
1.23.0
Features
-
Custom formatting on a per-type basis can be provided using
format.RegisterCustomFormatter()
-- see the docs here -
Substantial improvement have been made to
StopTrying()
:- Users can now use
StopTrying().Wrap(err)
to wrap errors andStopTrying().Attach(description, object)
to attach arbitrary objects to theStopTrying()
error StopTrying()
is now always interpreted as a failure. If you are an early adopter ofStopTrying()
you may need to change your code as the prior version would match against the returned value even ifStopTrying()
was returned. Going forward theStopTrying()
api should remain stable.StopTrying()
andStopTrying().Now()
can both be used in matchers - not just polled functions.
- Users can now use
-
TryAgainAfter(duration)
is used likeStopTrying()
but instructsEventually
andConsistently
that the poll should be tried again after the specified duration. This allows you to dynamically adjust the polling duration. -
ctx
can now be passed-in as the first argument toEventually
andConsistently
.