internal/terminal/terminal.go
func GetSize(fd int) (width, height int, err error) {
	ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
	if err != nil {
		return -1, -1, err
	}
	return int(ws.Col), int(ws.Row), nil
}
func GetSize(fd int) (width, height int, err error) {
	ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
	if err != nil {
		return -1, -1, err
	}
	return int(ws.Col), int(ws.Row), nil
}
func GetSize ( fd int ) ( width , height int , err error ) { ws , err := unix . IoctlGetWinsize ( fd , unix . TIOCGWINSZ ) if err != nil { return - 1 , - 1 , err } return int ( ws . Col ) , int ( ws . Row ) , nil }
// GetSize returns the dimensions of the given terminal.
GetSize returns the dimensions of the given terminal .