/usr/share/gocode/src/github.com/lxc/lxd/shared/termios/termios_windows.go is in golang-github-lxc-lxd-dev 2.0.2-0ubuntu1~16.04.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | // +build windows
package termios
import (
"golang.org/x/crypto/ssh/terminal"
)
type State terminal.State
func IsTerminal(fd int) bool {
return terminal.IsTerminal(fd)
}
func GetState(fd int) (*State, error) {
state, err := terminal.GetState(fd)
if err != nil {
return nil, err
}
currentState := State(*state)
return ¤tState, nil
}
func GetSize(fd int) (int, int, error) {
return terminal.GetSize(fd)
}
func MakeRaw(fd int) (*State, error) {
state, err := terminal.MakeRaw(fd)
if err != nil {
return nil, err
}
oldState := State(*state)
return &oldState, nil
}
func Restore(fd int, state *State) error {
newState := terminal.State(*state)
return terminal.Restore(fd, &newState)
}
|