code: func GetHandleInfo(in interface{}) (uintptr, bool) {
  	switch t := in.(type) {
  	case *ansiReader:
  		return t.Fd(), true
  	case *ansiWriter:
  		return t.Fd(), true
  	}
  
  	var inFd uintptr
  	var isTerminal bool
  
  	if file, ok := in.(*os.File); ok {
  		inFd = file.Fd()
  		isTerminal = IsConsole(inFd)
  	}
  	return inFd, isTerminal
  }
docs: // GetHandleInfo returns file descriptor and bool indicating whether the file is a console.