mirror of https://github.com/schollz/croc.git
21 lines
348 B
Go
21 lines
348 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gosuri/uiprogress"
|
|
)
|
|
|
|
func main() {
|
|
uiprogress.Start() // start rendering
|
|
bar := uiprogress.AddBar(100) // Add a new bar
|
|
|
|
// optionally, append and prepend completion and elapsed time
|
|
bar.AppendCompleted()
|
|
bar.PrependElapsed()
|
|
|
|
for bar.Incr() {
|
|
time.Sleep(time.Millisecond * 20)
|
|
}
|
|
}
|