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 @@
- 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.
- 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.
+ Several error values match the new
+ errors.ErrUnsupported
,
+ such that errors.Is(err, errors.ErrUnsupported)
+ returns true.
+
ENOSYS
ENOTSUP
EOPNOTSUPP
EPLAN9
(Plan 9 only)ERROR_CALL_NOT_IMPLEMENTED
(Windows only)ERROR_NOT_SUPPORTED
(Windows only)EWINDOWS
(Windows only)