summaryrefslogtreecommitdiff
path: root/vendor/github.com/buger/goterm/terminal_nosysioctl.go
blob: f4f4d5efcead1b6391c08a4cd084409d409e8aee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//go:build plan9 || solaris
// +build plan9 solaris

package goterm

func getWinsize() (*winsize, error) {
	ws := new(winsize)

	ws.Col = 80
	ws.Row = 24

	return ws, nil
}

// Height gets console height
func Height() int {
	ws, err := getWinsize()
	if err != nil {
		return -1
	}
	return int(ws.Row)
}