Skip to content

Commit a10b636

Browse files
committed
add another theme
1 parent 787de03 commit a10b636

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/theme-unicode/main.go

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package main
2+
3+
import (
4+
"time"
5+
6+
"github.com/schollz/progressbar/v3"
7+
)
8+
9+
func main() {
10+
bar := progressbar.NewOptions(100,
11+
progressbar.OptionUseANSICodes(false),
12+
progressbar.OptionEnableColorCodes(true),
13+
progressbar.OptionShowIts(),
14+
progressbar.OptionSetTheme(progressbar.ThemeUnicode),
15+
progressbar.OptionShowElapsedTimeOnFinish(),
16+
progressbar.OptionFullWidth(),
17+
)
18+
19+
for i := 0; i < 100; i++ {
20+
bar.Add(1)
21+
time.Sleep(66 * time.Millisecond)
22+
}
23+
}

0 commit comments

Comments
 (0)