Update dependencies (#333)

This commit is contained in:
tobi
2021-11-27 15:26:58 +01:00
committed by GitHub
parent ce22e03f9d
commit 182b4eea73
848 changed files with 377869 additions and 107280 deletions

View File

@ -105,6 +105,25 @@ func Data(err error) ErrorData {
return nil
}
// UnwrapAll fully unwraps an error stack to produce a string output.
func UnwrapAll(err error) string {
if err == nil {
return ""
}
// Start error output
out := err.Error()
err = Unwrap(err)
// Unwrap and append each
for err != nil {
out += ": " + err.Error()
err = Unwrap(err)
}
return out
}
// stringError is the simplest ErrorContext implementation
type stringError string