aboutsummaryrefslogtreecommitdiff
path: root/internal/ui
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ui')
-rw-r--r--internal/ui/bar.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/internal/ui/bar.go b/internal/ui/bar.go
index c1abce9..6904dbc 100644
--- a/internal/ui/bar.go
+++ b/internal/ui/bar.go
@@ -13,28 +13,6 @@ type BarStyle struct {
EmptyDim bool
}
-func RenderBar(current, max, width int, unicode bool) string {
- if max <= 0 {
- max = 1
- }
- if current < 0 {
- current = 0
- }
- if current > max {
- current = max
- }
- filled := int(math.Round(float64(current) * float64(width) / float64(max)))
- if filled > width {
- filled = width
- }
- if filled < 0 {
- filled = 0
- }
-
- fillRune, emptyRune := barRunes(unicode)
- return strings.Repeat(fillRune, filled) + strings.Repeat(emptyRune, width-filled)
-}
-
func RenderBarF(current, max float64, width int, unicode bool) string {
if max <= 0 {
max = 1