【文件属性】:
文件名称:pb:Golang的控制台进度栏
文件大小:44KB
文件格式:ZIP
更新时间:2021-02-02 15:39:50
go terminal progress-bar GoGo
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
【文件预览】:
pb-master
----pool.go(2KB)
----runecount_test.go(508B)
----v3()
--------template.go(2KB)
--------preset.go(790B)
--------go.mod(234B)
--------util_test.go(2KB)
--------go.sum(2KB)
--------io_test.go(2KB)
--------pb.go(12KB)
--------termutil()
--------element.go(8KB)
--------pb_test.go(6KB)
--------util.go(2KB)
--------speed.go(2KB)
--------LICENSE(1KB)
--------io.go(1KB)
--------element_test.go(9KB)
--------template_test.go(1KB)
----go.mod(212B)
----example_test.go(440B)
----reader.go(416B)
----pb_win.go(4KB)
----termios_bsd.go(187B)
----README_V1.md(3KB)
----go.sum(2KB)
----pool_x.go(546B)
----pb.go(12KB)
----pb_appengine.go(277B)
----pb_test.go(3KB)
----pb_x.go(2KB)
----runecount.go(364B)
----termios_sysv.go(325B)
----.travis.yml(272B)
----pb_plan9.go(1KB)
----LICENSE(1KB)
----README.md(3KB)
----writer.go(418B)
----format_test.go(2KB)
----pool_win.go(691B)
----example_copy_test.go(2KB)
----format.go(2KB)
----example_multiple_test.go(693B)