diff --git a/doc/go1.16.html b/doc/go1.16.html index a2f39893be9..92cadff7138 100644 --- a/doc/go1.16.html +++ b/doc/go1.16.html @@ -501,6 +501,10 @@ Do not send CLs removing the interior tags from such phrases.

SysProcAttr on Windows has a new NoInheritHandles field that disables inheriting handles when creating a new process.

+ +

+ DLLError on Windows now has an Unwrap function for unwrapping its underlying error. +

diff --git a/src/syscall/dll_windows.go b/src/syscall/dll_windows.go index c54feec56ae..d99da000896 100644 --- a/src/syscall/dll_windows.go +++ b/src/syscall/dll_windows.go @@ -20,6 +20,8 @@ type DLLError struct { func (e *DLLError) Error() string { return e.Msg } +func (e *DLLError) Unwrap() error { return e.Err } + // Implemented in ../runtime/syscall_windows.go. func Syscall(trap, nargs, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)