isatty_plan9.go

 1//go:build plan9
 2// +build plan9
 3
 4package isatty
 5
 6import (
 7	"syscall"
 8)
 9
10// IsTerminal returns true if the given file descriptor is a terminal.
11func IsTerminal(fd uintptr) bool {
12	path, err := syscall.Fd2path(int(fd))
13	if err != nil {
14		return false
15	}
16	return path == "/dev/cons" || path == "/mnt/term/dev/cons"
17}
18
19// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
20// terminal. This is also always false on this environment.
21func IsCygwinTerminal(fd uintptr) bool {
22	return false
23}