Gitiles
Code Review
Sign In
gerrit.opencord.org
/
voltha-go-controller
/
4ead4e04006b2f406aae4f0100c8315b2e535eb4
/
.
/
vendor
/
github.com
/
jessevdk
/
go-flags
/
termsize.go
blob: 829e477addfb5f915d12a48290019f0ea8a12391 [
file
] [
log
] [
blame
]
// +build !windows,!plan9,!appengine,!wasm
package flags
import (
"golang.org/x/sys/unix"
)
func getTerminalColumns() int {
ws, err := unix.IoctlGetWinsize(0, unix.TIOCGWINSZ)
if err != nil {
return 80
}
return int(ws.Col)
}