errnoErr returns common boxed Errno values, to prevent allocations at runtime.
(e syscall.Errno)
| 25 | // errnoErr returns common boxed Errno values, to prevent |
| 26 | // allocations at runtime. |
| 27 | func errnoErr(e syscall.Errno) error { |
| 28 | switch e { |
| 29 | case 0: |
| 30 | return errERROR_EINVAL |
| 31 | case errnoERROR_IO_PENDING: |
| 32 | return errERROR_IO_PENDING |
| 33 | } |
| 34 | // TODO: add more here, after collecting data on the common |
| 35 | // error values see on Windows. (perhaps when running |
| 36 | // all.bat?) |
| 37 | return e |
| 38 | } |
| 39 | |
| 40 | var ( |
| 41 | moddbghelp = windows.NewLazySystemDLL("dbghelp.dll") |
no outgoing calls
no test coverage detected