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
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))
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: