diff --git a/doc/go1.20.html b/doc/go1.20.html index 767b6b646f..a64a8d8f3e 100644 --- a/doc/go1.20.html +++ b/doc/go1.20.html @@ -165,7 +165,26 @@ Do not send CLs removing the interior tags from such phrases.
- TODO: https://go.dev/cl/432898: errors, fmt: add support for wrapping multiple errors + Go 1.20 expands support for error wrapping to permit an error to + wrap multiple other errors. +
+
+ An error e can wrap more than one error by providing
+ an Unwrap method that returns a []error.
+
+ The errors.Is and
+ errors.As functions
+ have been updated to inspect multiply wrapped errors.
+
+ The fmt.Errorf function
+ now supports multiple occurrances of the %w format verb,
+ which will cause it to return an error that wraps all of those error operands.
+
+ The new function errors.Join
+ returns an error wrapping a list of errors.
+ The new Join function returns an error wrapping a list of errors.
+
+ The Errorf function supports multiple occurrances of
+ the %w format verb.
+
TODO: https://go.dev/issue/51668: add FormatString(State) string