Files
podman/vendor/github.com/buger/goterm/terminal_sysioctl.go
Valentin Rothberg bd40dcfc2b vendor: update everything
* If possible, update each dependency to the latest available version.

* Use releases over commit IDs and avoid vendoring branches.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-11 13:38:11 +01:00

19 lines
301 B
Go

// +build !windows,!plan9,!solaris
package goterm
import (
"os"
"golang.org/x/sys/unix"
)
func getWinsize() (*unix.Winsize, error) {
ws, err := unix.IoctlGetWinsize(int(os.Stdout.Fd()), unix.TIOCGWINSZ)
if err != nil {
return nil, os.NewSyscallError("GetWinsize", err)
}
return ws, nil
}