diff --git a/examples/theme-unicode/main.go b/examples/theme-unicode/main.go new file mode 100644 index 0000000..6efc5a9 --- /dev/null +++ b/examples/theme-unicode/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "time" + + "github.com/schollz/progressbar/v3" +) + +func main() { + bar := progressbar.NewOptions(100, + progressbar.OptionUseANSICodes(false), + progressbar.OptionEnableColorCodes(true), + progressbar.OptionShowIts(), + progressbar.OptionSetTheme(progressbar.ThemeUnicode), + progressbar.OptionShowElapsedTimeOnFinish(), + progressbar.OptionFullWidth(), + ) + + for i := 0; i < 100; i++ { + bar.Add(1) + time.Sleep(66 * time.Millisecond) + } +}