func fileDescriptor(w io.Writer) (fd int, ok bool) {
	file, ok := w.(interface{ Fd() uintptr })
	if ok {
		fd = int(file.Fd())
	}
	return fd, ok
}
func fileDescriptor(w io.Writer) (fd int, ok bool) {
	file, ok := w.(interface{ Fd() uintptr })
	if ok {
		fd = int(file.Fd())
	}
	return fd, ok
}
// fileDescriptor returns the file descriptor associated with the
// writer, or (0, false) if no file descriptor is available.