From a10b636f5a690096337941ee61c32e150809f8e6 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Thu, 3 Oct 2024 12:08:32 -0700 Subject: [PATCH] add another theme --- examples/theme-unicode/main.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/theme-unicode/main.go 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) + } +}