(setter func(uintptr) (*term.State, error))
| 51 | } |
| 52 | |
| 53 | func (s *commonStream) setRawTerminal(setter func(uintptr) (*term.State, error)) error { |
| 54 | if !s.tty || os.Getenv("NORAW") != "" { |
| 55 | return nil |
| 56 | } |
| 57 | state, err := setter(s.fd) |
| 58 | if err != nil { |
| 59 | return err |
| 60 | } |
| 61 | s.state = state |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | func (s *commonStream) terminalSize() (height uint, width uint) { |
| 66 | if !s.tty { |
no outgoing calls
no test coverage detected