code: func GetConsoleMode(handle uintptr) (mode uint32, err error) {
  	err = syscall.GetConsoleMode(syscall.Handle(handle), &mode)
  	return mode, err
  }
docs: // GetConsoleMode gets the console mode for given file descriptor
  // See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx.