From 7fe39190c87e0d6b04259d722047f37b304e876d Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 21 Aug 2023 15:11:25 -0400 Subject: [PATCH] feat(progress): make full/empty fill characters configurable --- progress/progress.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/progress/progress.go b/progress/progress.go index 871d35d..3ebdd1d 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -79,6 +79,14 @@ func WithSolidFill(color string) Option { } } +// WithCustomFillCharacters sets the characters used to construct the full and empty components of the progress bar. +func WithCustomFillCharacters(full rune, empty rune) Option { + return func(m *Model) { + m.Full = full + m.Empty = empty + } +} + // WithoutPercentage hides the numeric percentage. func WithoutPercentage() Option { return func(m *Model) {