Source File
error.go
Belonging Package
github.com/tetratelabs/wazero/experimental/sys
package sysimport ()// UnwrapOSError returns an Errno or zero if the input is nil.func ( error) Errno {if == nil {return 0}= underlyingError()switch {case nil, io.EOF:return 0 // EOF is not a Errnocase fs.ErrInvalid:return EINVALcase fs.ErrPermission:return EPERMcase fs.ErrExist:return EEXISTcase fs.ErrNotExist:return ENOENTcase fs.ErrClosed:return EBADF}return errorToErrno()}// underlyingError returns the underlying error if a well-known OS error type.//// This impl is basically the same as os.underlyingError in os/error.gofunc underlyingError( error) error {switch err := .(type) {case *os.PathError:return .Errcase *os.LinkError:return .Errcase *os.SyscallError:return .Err}return}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |