Issue I noticed is when trying errors.Errorf("reached 0 %w", Fail): This is actually doesn't support Go 1.13 error wrapping format (output was reached 0 %!w(*failure.FailError=&{}))
Created the following snippet to test it:
var (
Fail = &FailError{}
)
type FailError struct{}
func (f FailError) Error() string {
return "This is a fail error"
}
func FailR(depth int) error {
if depth == 0 {
return errors.Errorf("reached 0 %w", Fail) // This works fine: fmt.Errorf("reached 0 %w", Fail)
}
return errors.Wrap(FailR(depth-1), fmt.Sprintf("Failed stack (%d)", depth))
}
Issue I noticed is when trying
errors.Errorf("reached 0 %w", Fail): This is actually doesn't support Go 1.13 error wrapping format (output wasreached 0 %!w(*failure.FailError=&{}))Created the following snippet to test it: