diff --git a/terminaldimensions_test.go b/terminaldimensions_test.go index b5118b7..a30641d 100644 --- a/terminaldimensions_test.go +++ b/terminaldimensions_test.go @@ -1,6 +1,9 @@ package terminaldimensions -import "testing" +import ( + "fmt" + "testing" +) func Test_parse(t *testing.T) { type args struct { @@ -40,3 +43,12 @@ func Test_parse(t *testing.T) { }) } } + +func ExampleDimensions() { + x, y, err := Dimensions() + if err != nil { + panic(err) + } + + fmt.Printf("Terminal is %d wide and %d high", x, y) +}