summaryrefslogtreecommitdiff
path: root/vendor/github.com/buger/goterm/terminal_nosysioctl.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-02-04 12:08:41 +0000
committerGitHub <noreply@github.com>2022-02-04 12:08:41 +0000
commit54cf0f05e3f32bf87365aaea7f87c6c079dc4d48 (patch)
tree519e36c1a54c92125e8b4d57be35290cbd7dca25 /vendor/github.com/buger/goterm/terminal_nosysioctl.go
parent608b6142edb7a4e179ce6d2ae69707be28f29359 (diff)
downloadpodman-54cf0f05e3f32bf87365aaea7f87c6c079dc4d48.tar.gz
podman-54cf0f05e3f32bf87365aaea7f87c6c079dc4d48.tar.bz2
podman-54cf0f05e3f32bf87365aaea7f87c6c079dc4d48.zip
Bump github.com/buger/goterm from 1.0.1 to 1.0.4
Bumps [github.com/buger/goterm](https://github.com/buger/goterm) from 1.0.1 to 1.0.4. - [Release notes](https://github.com/buger/goterm/releases) - [Commits](https://github.com/buger/goterm/compare/v1.0.1...v1.0.4) --- updated-dependencies: - dependency-name: github.com/buger/goterm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
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)
+}