GoTerminal: Go library to render progress on terminal
GoTerminal is an open source Golang package for updating progress in the console. It is a simple cross-platform package and can be used to render progress in command line applications. For example, to show download progress, show the progress bar for test execution etc.
This can be visually rich and gives the user real-time feedback on background operations, without clumsy data. You can update text at any particular coordinate on screen easily using a Writer
instance. This can also be integrated with Go-Colortext package to add colours to console text.
Installation
Usage
Example
Another example which uses the go-colortext library to re-write text along with using colours. Here is an output of example:
Examples can be found here.
More on usage
- Create a
Writer
instance. - Add your text to writer’s buffer and call
Print()
to print text on Terminal. This can be called any number of times. - Call
Clear()
to move the cursor to the position where firstPrint()
started so that it can be over-written. Reset()
writer, so it clears its state for next Write.
Like it? Let me know.
Questions or issues using GoTerminal? Post an issue on Github.