aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/buger/goterm/terminal_nosysioctl.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/buger/goterm/terminal_nosysioctl.go')
-rw-r--r--vendor/github.com/buger/goterm/terminal_nosysioctl.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/buger/goterm/terminal_nosysioctl.go b/vendor/github.com/buger/goterm/terminal_nosysioctl.go
index 9b988ffd5..f4f4d5efc 100644
--- a/vendor/github.com/buger/goterm/terminal_nosysioctl.go
+++ b/vendor/github.com/buger/goterm/terminal_nosysioctl.go
@@ -1,3 +1,4 @@
+//go:build plan9 || solaris
// +build plan9 solaris
package goterm
@@ -10,3 +11,12 @@ func getWinsize() (*winsize, error) {
return ws, nil
}
+
+// Height gets console height
+func Height() int {
+ ws, err := getWinsize()
+ if err != nil {
+ return -1
+ }
+ return int(ws.Row)
+}