示例#1
0
文件: table.go 项目: pgpst/pgpst
func init() {
	// do not enable UTF-8 per locale by default, breaks tests
	sz, err := term.GetSize()
	if err == nil && sz.Columns != 0 {
		MaxColumns = sz.Columns
	}
}
示例#2
0
文件: wrapper.go 项目: pgpst/pgpst
func main() {
	size, err := term.GetSize()
	if err != nil {
		fmt.Fprintf(os.Stderr, "failed: %s\n", err)
		os.Exit(1)
	}

	fmt.Printf("Lines %d  Columns %d\n", size.Lines, size.Columns)
}