Currently errors.Is(syscall.ENOENT, fs.ErrNotExist) return true, but
errors.Is(syscall.EINVAL, fs.ErrInvalid) returns false. As far as I can
tell that is because of

func (e Errno) Is(target error) bool {
        switch target {
        case oserror.ErrPermission:
                return e == EACCES || e == EPERM
        case oserror.ErrExist:
                return e == EEXIST || e == ENOTEMPTY
        case oserror.ErrNotExist:
                return e == ENOENT
        }
        return false
}

in syscall_unix.go missing an ErrInvalid case. Is that intentional? I
see related issues showing up on github and being closed as duplicates
of https://github.com/golang/go/issues/30322. Should I just add this
case to that issue?

Thanks,
Rafael

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/875yh6lalr.fsf%40espindo.la.

Reply via email to