(file *os.File)
| 25 | type Option func(*unix.Termios) |
| 26 | |
| 27 | func GetState(file *os.File) (*unix.Termios, error) { |
| 28 | fileFD := file.Fd() |
| 29 | fileFDInt := int(fileFD) |
| 30 | state, err := unix.IoctlGetTermios(fileFDInt, unix.TCGETS) |
| 31 | return state, err |
| 32 | } |
| 33 | |
| 34 | func IsTerminal(file *os.File) bool { |
| 35 | if _, err := GetState(file); err != nil { |
no outgoing calls
searching dependent graphs…