| 1 | //go:build !windows |
| 2 | |
| 3 | package forward |
| 4 | |
| 5 | import ( |
| 6 | "errors" |
| 7 | "syscall" |
| 8 | ) |
| 9 | |
| 10 | // isAddrInUse reports whether err is an "address already in use" bind error. |
| 11 | // Unix reports EADDRINUSE. |
| 12 | func isAddrInUse(err error) bool { |
| 13 | return errors.Is(err, syscall.EADDRINUSE) |
| 14 | } |
| 15 |