mirror of
https://github.com/rkfg/regolancer
synced 2024-11-15 00:15:27 +00:00
17 lines
294 B
Go
17 lines
294 B
Go
//go:build !windows && !plan9 && !appengine && !wasm
|
|
// +build !windows,!plan9,!appengine,!wasm
|
|
|
|
package helpmessage
|
|
|
|
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)
|
|
}
|