From c75a034d25ca87f3d209a8e82c743b8a7e96573b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Mar 2026 14:15:38 +0800 Subject: internal/progress: Add progress meter --- internal/progress/options.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 internal/progress/options.go (limited to 'internal/progress/options.go') diff --git a/internal/progress/options.go b/internal/progress/options.go new file mode 100644 index 00000000..d7c08894 --- /dev/null +++ b/internal/progress/options.go @@ -0,0 +1,22 @@ +package progress + +import ( + "io" + "time" +) + +// Options configures one progress meter. +type Options struct { + Writer io.Writer + Flush func() error + + Title string + Total uint64 + + // Delay suppresses progress output until Delay has elapsed since Start. + Delay time.Duration + // Sparse forces one final 100% line at Stop when the caller sampled updates. + Sparse bool + // Throughput appends ", | /s" and refreshes rate every 500ms. + Throughput bool +} -- cgit v1.3.1-10-gc9f91