diff --git a/internal/percentage.go b/internal/percentage.go index e321e0a..a8ef8be 100644 --- a/internal/percentage.go +++ b/internal/percentage.go @@ -13,6 +13,7 @@ return float64(int64(width)*current) / float64(total) } +// PercentageRound same as Percentage but with math.Round. func PercentageRound(total, current int64, width int) float64 { return math.Round(Percentage(total, current, width)) } diff --git a/internal/predicate.go b/internal/predicate.go index 1c2902e..1e4dd24 100644 --- a/internal/predicate.go +++ b/internal/predicate.go @@ -1,5 +1,6 @@ package internal +// Predicate helper for internal use. func Predicate(pick bool) func() bool { return func() bool { return pick } }