コード例 #1
0
ファイル: render.go プロジェクト: sdolan99/inspect
// TermHeight returns the current terminal's height.
func TermHeight() int {
	tm.Sync()
	_, h := tm.Size()
	return h
}
コード例 #2
0
ファイル: render.go プロジェクト: sdolan99/inspect
// TermWidth returns the current terminal's width.
func TermWidth() int {
	tm.Sync()
	w, _ := tm.Size()
	return w
}