File: size.go

package info (click to toggle)
golang-github-liamg-clinch 1.5.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 5,576 kB
  • sloc: makefile: 2
file content (9 lines) | stat: -rw-r--r-- 225 bytes parent folder | download
1
2
3
4
5
6
7
8
9
package terminal

import "golang.org/x/crypto/ssh/terminal"

// Size returns the width and height of the terminal, in columns and rows
func Size() (int, int) {
	width, height, _ := terminal.GetSize(0)
	return width, height
}