README ¶ 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 $ go get github.com/nathan-fiscaletti/consolesize-go Usage package main import ( "fmt" "github.com/nathan-fiscaletti/consolesize-go" ) func main() { cols, rows := consolesize.GetConsoleSize() fmt.Printf("Rows: %v, Cols: %v\n", rows, cols) } Expand ▾ Collapse ▴ Documentation ¶ Rendered for linux/amd64 windows/amd64 darwin/amd64 js/wasm Index ¶ func GetConsoleSize() (int, int) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetConsoleSize ¶ func GetConsoleSize() (int, int) GetConsoleSize returns the current number of columns and rows in the active console window. The return value of this function is in the order of cols, rows. Types ¶ This section is empty. Source Files ¶ View all Source files consolesize_unix.go Click to show internal directories. Click to hide internal directories.