mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
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>
23 lines
303 B
Go
23 lines
303 B
Go
//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)
|
|
}
|