Go的终端进度栏
安装
go get github.com/cheggaaa/pb/v3
v1栏的文档可
快速开始
package main
import (
"time"
"github.com/cheggaaa/pb/v3"
)
func main () {
count := 100000
// create and start new bar
bar := pb . StartNew ( count )
// start bar from 'default' template
// bar := pb.Default.Start(count)
// start bar from 'simple' template
// bar := pb.Simple.Start(count)
// start bar from 'full' template
// bar := pb.Full.Start(count)
for i := 0 ; i < count ; i ++ {
bar . Increment ()
time . Slee
1