Make sure to use error wrapping and Errors.Is
AnomalRoil opened this issue · 2 comments
AnomalRoil commented
Instead of comparing error strings:
if !strings.Contains(err.Error(), tlock.ErrTooEarly)
Also it would allow us to make sure our errors are compatible Errors.Is
, which I'm currently not convinced of, since they seem to be const strings.
ardan-bkennedy commented
Great catch!!!