refactor: simply errors (#15067)

This commit is contained in:
Julien Robert
2023-02-20 12:03:40 +00:00
committed by GitHub
parent f69b9ff58f
commit 067ee92d4d
51 changed files with 391 additions and 160 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ information by using Wrap function, for example:
func safeDiv(val, div int) (int, err) {
if div == 0 {
return 0, errorsmod.Wrapf(ErrZeroDivision, "cannot divide %d", val)
return 0, errors.Wrapf(ErrZeroDivision, "cannot divide %d", val)
}
return val / div, nil
}