@@ -165,7 +165,26 @@ <h3 id="crypto/ecdh">New <code>crypto/ecdh</code> package</h3>
165
165
< h3 id ="errors "> Wrapping multiple errors</ h3 >
166
166
167
167
< p > <!-- CL 432898 -->
168
- TODO: < a href ="https://go.dev/cl/432898 "> https://go.dev/cl/432898</ a > : errors, fmt: add support for wrapping multiple errors
168
+ Go 1.20 expands support for error wrapping to permit an error to
169
+ wrap multiple other errors.
170
+ </ p >
171
+ < p >
172
+ An error < code > e</ code </ e > can wrap more than one error by providing
173
+ an < code > Unwrap</ code > method that returns a < code > []error</ code > .
174
+ </ p >
175
+ < p >
176
+ The < a href ="/pkg/errors/#Is "> < code > errors.Is</ code > </ a > and
177
+ < a href ="/pkg/errors/#As "> < code > errors.As</ code > </ a > functions
178
+ have been updated to inspect multiply wrapped errors.
179
+ </ p >
180
+ < p >
181
+ The < a href ="/pkg/fmt/#Errorf "> < code > fmt.Errorf</ code > </ a > function
182
+ now supports multiple occurrances of the < code > %w</ code > format verb,
183
+ which will cause it to return an error that wraps all of those error operands.
184
+ </ p >
185
+ < p >
186
+ The new function < a href ="/pkg/errors/#Join "> < code > errors.Join</ code > </ a >
187
+ returns an error wrapping a list of errors.
169
188
</ p >
170
189
171
190
< h3 id ="minor_library_changes "> Minor changes to the library</ h3 >
@@ -312,8 +331,20 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
312
331
</ dd >
313
332
</ dl > <!-- encoding/xml -->
314
333
334
+ < dl id ="errors "> < dt > < a href ="/pkg/errors/ "> errors</ a > </ dt >
335
+ < dd >
336
+ < p > <!-- https://go.dev/issue/53435 -->
337
+ The new < code > Join</ code > function returns an error wrapping a list of errors.
338
+ </ p >
339
+ </ dd >
340
+ </ dl > <!-- errors -->
341
+
315
342
< dl id ="fmt "> < dt > < a href ="/pkg/fmt/ "> fmt</ a > </ dt >
316
343
< dd >
344
+ < p > <!-- https://go.dev/issue/53435 -->
345
+ The < code > Errorf</ code > function supports multiple occurrances of
346
+ the < code > %w</ code > format verb.
347
+ </ p >
317
348
< p > <!-- https://go.dev/issue/51668 -->
318
349
TODO: < a href ="https://go.dev/issue/51668 "> https://go.dev/issue/51668</ a > : add FormatString(State) string
319
350
</ p >
0 commit comments