github.com/go-darwin/sys@v0.0.0-20220510002607-68fd01f054ca/error.go (about) 1 // Copyright 2021 The Go Darwin Authors 2 // SPDX-License-Identifier: BSD-3-Clause 3 4 package sys 5 6 import "syscall" 7 8 // Errno is the type alias of syscall.Errno, an unsigned number describing an error condition. 9 // 10 // It implements the error interface. The zero Errno is by convention 11 // a non-error, so code to convert from Errno to error should use: 12 // 13 // err = nil 14 // if errno != 0 { 15 // err = errno 16 // } 17 // 18 // Errno values can be tested against error values from the os package 19 // using errors.Is. For example: 20 // 21 // _, _, err := syscall.Syscall(...) 22 // if errors.Is(err, fs.ErrNotExist) ... 23 type Errno = syscall.Errno