SyscallConn() for the File struct has been aded in Go 1.12:
File now supports a SyscallConn method returning a syscall.RawConn interface value. This may be used to invoke system-specific operations on the underlying file descriptor.
https://tip.golang.org/doc/go1.12#os
Yep, I'd like to clean this up a bit more and merge it once 1.12 hits, and then just require Go 1.12+ for this package so that timeouts actually work and are efficient.
SyscallConn()
for theFile
struct has been aded in Go 1.12: