Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathan-fiscaletti/consolesize-go
A library for determining the size of the Console in Go (GoLang) (supports both Windows and Unix systems)
https://github.com/nathan-fiscaletti/consolesize-go
console go golang unix windows
Last synced: 17 days ago
JSON representation
A library for determining the size of the Console in Go (GoLang) (supports both Windows and Unix systems)
- Host: GitHub
- URL: https://github.com/nathan-fiscaletti/consolesize-go
- Owner: nathan-fiscaletti
- License: mit
- Created: 2020-08-13T18:15:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-04T10:16:20.000Z (almost 3 years ago)
- Last Synced: 2024-10-13T12:27:38.365Z (about 1 month ago)
- Topics: console, go, golang, unix, windows
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 32
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# consolesize-go
[![Sponsor Me!](https://img.shields.io/badge/%F0%9F%92%B8-Sponsor%20Me!-blue)](https://github.com/sponsors/nathan-fiscaletti)
[![GoDoc](https://godoc.org/github.com/nathan-fiscaletti/consolesize-go?status.svg)](https://godoc.org/github.com/nathan-fiscaletti/consolesize-go)
[![Go Report Card](https://goreportcard.com/badge/github.com/nathan-fiscaletti/consolesize-go)](https://goreportcard.com/report/github.com/nathan-fiscaletti/consolesize-go)**consolesize-go** is a library that will allow you to read the size of any console window on both **Unix** and **Windows** systems.
## Install
```sh
$ go get github.com/nathan-fiscaletti/consolesize-go
```## Usage
```go
package mainimport (
"fmt""github.com/nathan-fiscaletti/consolesize-go"
)func main() {
cols, rows := consolesize.GetConsoleSize()
fmt.Printf("Rows: %v, Cols: %v\n", rows, cols)
}
```