Registry / utility / wayneashleyberry-terminal-dimensions

wayneashleyberry-terminal-dimensions

JSON →
library1.1.0gogounverified

A Go library to retrieve the width and height of the terminal window.

go get github.com/wayneashleyberry/terminal-dimensions
INSTALL
IMPORT
SIG · WAYNEASHLEYBERRY-T
W
wayneashleyberry-terminal-dimensions
utilitygov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

terminaldimensions
github.com/wayneashleyberry/terminal-dimensions

Get terminal width and height

package main import ( "fmt" "github.com/wayneashleyberry/terminal-dimensions" ) func main() { width, err := terminaldimensions.Width() if err != nil { panic(err) } height, err := terminaldimensions.Height() if err != nil { panic(err) } fmt.Printf("Terminal size: %dx%d\n", width, height) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
wayneashleyberry-terminal-dimensions — go get wayneashleyberry-terminal-dimensions · libregistry