Skip to content

A small utility library for Go that helps manipulate the terminal.

License

Notifications You must be signed in to change notification settings

MinoMino/minterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minterm

minterm

Just a small library to help manipulate the terminal in Go. I needed something like Python's shutil.get_terminal_size(), so I wrote this, then added some more stuff I ended up needing.

Usage

###Import

import "github.com/MinoMino/minterm"

###Terminal Size

columns, rows, err := minterm.TerminalSize()

###Line Reservation

lr, _ := NewLineReserver()
defer lr.Release()
lr.Set("This line will always be the last line.")
fmt.Println("You can now print normally.")

An example of it used in conjunction with minprogress: Image of line reservation in use with minprogress.

License

MIT. See LICENSE for details.

About

A small utility library for Go that helps manipulate the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages