diff --git a/doc/go1.21.html b/doc/go1.21.html index 0be1bdce5f6d78..2de104219e0aac 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -426,12 +426,14 @@

Minor changes to the library

errors
-

- TODO: https://go.dev/issue/41198: add ErrUnsupported -

- -

- TODO: https://go.dev/cl/473935: errors: add ErrUnsupported; modified api/next/41198.txt +

+ The new + ErrUnsupported + error provides a standardized way to indicate that a requested + operation may not be performed because it is unsupported. + For example, a call to + os.Link when using a + file system that does not support hard links.

@@ -646,7 +648,11 @@

Minor changes to the library

- TODO: https://go.dev/cl/494122: net/http: let ErrNotSupported match errors.ErrUnsupported; modified api/next/41198.txt + The net/http package now supports + errors.ErrUnsupported, + in that the expression + errors.Is(http.ErrNotSupported, errors.ErrUnsupported) + will return true.

@@ -828,6 +834,22 @@

Minor changes to the library

This is backward compatible as WTF-8 is a superset of the UTF-8 format that was used in earlier releases.

+ +

+ Several error values match the new + errors.ErrUnsupported, + such that errors.Is(err, errors.ErrUnsupported) + returns true. +

+