consolesize

package module
v0.0.0-...-317176b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 2 Imported by: 0

README

consolesize-go

Sponsor Me! GoDoc Go Report Card

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)
}

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL