Popularity
7.8
Stable
Activity
0.0
Stable
1,653
18
82

Programming language: Go
License: MIT License
Latest version: v0.0.4

uilive alternatives and similar packages

Based on the "Advanced Console UIs" category.
Alternatively, view uilive alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of uilive or a related project?

Add another 'Advanced Console UIs' Package

README

uilive GoDoc Build Status

uilive is a go library for updating terminal output in realtime. It provides a buffered io.Writer that is flushed at a timed interval. uilive powers uiprogress.

Usage Example

Calling uilive.New() will create a new writer. To start rendering, simply call writer.Start() and update the ui by writing to the writer. Full source for the below example is in [example/main.go](example/main.go).

writer := uilive.New()
// start listening for updates and render
writer.Start()

for i := 0; i <= 100; i++ {
  fmt.Fprintf(writer, "Downloading.. (%d/%d) GB\n", i, 100)
  time.Sleep(time.Millisecond * 5)
}

fmt.Fprintln(writer, "Finished: Downloaded 100GB")
writer.Stop() // flush and stop rendering

The above will render

[example](doc/example.gif)

Installation

$ go get -v github.com/gosuri/uilive