You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: syscall_errno_windows.go
    path of file: ./repos/wazero/experimental/sys
    
    the code of the file until where you have to start completion: package sys

import "syscall"

// These are errors not defined in the syscall package. They are prefixed with
// underscore to avoid exporting them.
//
// See https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
const (
	// _ERROR_INVALID_HANDLE is a Windows error returned by syscall.Write
	// instead of syscall.EBADF
	_ERROR_INVALID_HANDLE = syscall.Errno(6)

	// _ERROR_INVALID_NAME is a Windows error returned by open when a file
	// path ha
    
func errorToErrno(err error) Errno {
	switch err := err.(type) {
	case Errno:
		return err
	case syscall.Errno:
		// Note: In windows, _ERROR_PATH_NOT_FOUND(0x3) maps to syscall.ENOTDIR
		switch err {
		case syscall.ERROR_ALREADY_EXISTS:
			return EEXIST
		case _ERROR_DIRECTORY:
			return ENOTDIR
		case syscall.ERROR_DIR_NOT_EMPTY:
			return ENOTEMPTY
		case syscall.ERROR_FILE_EXISTS:
			return EEXIST
		case _ERROR_INVALID_HANDLE, _ERROR_INVALID_SOCKET:
			return EBADF
		case syscall.ERROR_ACCESS_DENIED:
			// POSIX read and write functions expect EBADF, not EACCES when not
			// open for reading or writing.
			return EBADF
		case syscall.ERROR_PRIVILEGE_NOT_HELD:
			return EPERM
		case _ERROR_NEGATIVE_SEEK, _ERROR_INVALID_NAME:
			return EINVAL
		}
		errno, _ := syscallToErrno(err)
		return errno
	default:
		return EIO
	}
}