Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 837 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 837 Bytes

Go Go Reference Go Report Card

go get github.com/wayneashleyberry/terminal-dimensions
package main

import (
	"fmt"

	terminal "github.com/wayneashleyberry/terminal-dimensions"
)

func main() {
	x, y, err := terminal.Dimensions()
	if err != nil {
		panic(err)
	}

	fmt.Printf("Terminal is %d wide and %d high", x, y)
}