Debian Codegraph @

debian/vendor/github.com/nathan-fiscaletti/consolesize-go/README.md

raw
1 # consolesize-go
2
3 [![Sponsor Me!](https://img.shields.io/badge/%F0%9F%92%B8-Sponsor%20Me!-blue)](https://github.com/sponsors/nathan-fiscaletti)
4 [![GoDoc](https://godoc.org/github.com/nathan-fiscaletti/consolesize-go?status.svg)](https://godoc.org/github.com/nathan-fiscaletti/consolesize-go)
5 [![Go Report Card](https://goreportcard.com/badge/github.com/nathan-fiscaletti/consolesize-go)](https://goreportcard.com/report/github.com/nathan-fiscaletti/consolesize-go)
6
7 **consolesize-go** is a library that will allow you to read the size of any console window on both **Unix** and **Windows** systems.
8
9 ## Install
10
11 ```sh
12 $ go get github.com/nathan-fiscaletti/consolesize-go
13 ```
14
15 ## Usage
16
17 ```go
18 package main
19
20 import (
21 "fmt"
22
23 "github.com/nathan-fiscaletti/consolesize-go"
24 )
25
26 func main() {
27 cols, rows := consolesize.GetConsoleSize()
28 fmt.Printf("Rows: %v, Cols: %v\n", rows, cols)
29 }
30 ```
31