You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/tinyming-go/progress-bar-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/tinyming-go/progress-bar-go

v0.0.0-20220829015949-65c98757a384
Source
Go
Version published
Created
Source

progress-bar-go

GO写的进度条

概述

最终呈现的效果 [█████████████████████████]100/100 [eta]16:33:39 [qps]9

当然,为了更酷炫一点,同时还引入了emoji字符,能够根据字符自适应地调整显示效果。

[❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️]100/100 [eta]09:59:03 [qps]33

[⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️]100/100 [eta]09:59:05 [qps]33

[龘龘龘龘龘龘龘龘龘龘龘龘龘]100/100 [eta]09:59:07 [qps]33

[🍺🍺🍺🍺🍺🍺🍺🍺🍺🍺🍺🍺🍺]100/100 [eta]09:59:09 [qps]33

安装

go get -u github.com/Tinyming-GO/progress-bar-go

如何使用

package main

import (
	"time"

	progress "github.com/Tinyming-GO/progress-bar-go"
)

func main() {
	bar := progress.New(100)
	for i := 0; i < 100; i++ {
		time.Sleep(time.Second / 10)
		bar.Done(1)
	}
	bar.Finish()
}

FAQs

Package last updated on 29 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts