diff --git a/decor/any.go b/decor/any.go index 39518f5..1ab764a 100644 --- a/decor/any.go +++ b/decor/any.go @@ -6,7 +6,6 @@ // `fn` DecorFunc callback // // `wcc` optional WC config -// func Any(fn DecorFunc, wcc ...WC) Decorator { return &any{initWC(wcc...), fn} } diff --git a/decor/counters.go b/decor/counters.go index 4a5343d..331c3df 100644 --- a/decor/counters.go +++ b/decor/counters.go @@ -42,7 +42,6 @@ // pairFmt="% .1f / % .1f" output: "1.0 MB / 12.0 MB" // pairFmt="%d / %d" output: "1MB / 12MB" // pairFmt="% d / % d" output: "1 MB / 12 MB" -// func Counters(unit int, pairFmt string, wcc ...WC) Decorator { producer := func(unit int, pairFmt string) DecorFunc { if pairFmt == "" { @@ -99,7 +98,6 @@ // format="% .1f" output: "12.0 MiB" // format="%d" output: "12MiB" // format="% d" output: "12 MiB" -// func Total(unit int, format string, wcc ...WC) Decorator { producer := func(unit int, format string) DecorFunc { if format == "" { @@ -157,7 +155,6 @@ // format="% .1f" output: "12.0 MiB" // format="%d" output: "12MiB" // format="% d" output: "12 MiB" -// func Current(unit int, format string, wcc ...WC) Decorator { producer := func(unit int, format string) DecorFunc { if format == "" { @@ -215,7 +212,6 @@ // format="% .1f" output: "12.0 MiB" // format="%d" output: "12MiB" // format="% d" output: "12 MiB" -// func InvertedCurrent(unit int, format string, wcc ...WC) Decorator { producer := func(unit int, format string) DecorFunc { if format == "" { diff --git a/decor/doc.go b/decor/doc.go index 04614aa..d41aa50 100644 --- a/decor/doc.go +++ b/decor/doc.go @@ -6,10 +6,10 @@ // // Don't: // -// p := mpb.New() -// name := decor.Name("bar") -// p.AddBar(100, mpb.AppendDecorators(name)) -// p.AddBar(100, mpb.AppendDecorators(name)) +// p := mpb.New() +// name := decor.Name("bar") +// p.AddBar(100, mpb.AppendDecorators(name)) +// p.AddBar(100, mpb.AppendDecorators(name)) // // Do: // diff --git a/decor/elapsed.go b/decor/elapsed.go index e389f15..6cee7d1 100644 --- a/decor/elapsed.go +++ b/decor/elapsed.go @@ -9,7 +9,6 @@ // `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS] // // `wcc` optional WC config -// func Elapsed(style TimeStyle, wcc ...WC) Decorator { return NewElapsed(style, time.Now(), wcc...) } @@ -21,7 +20,6 @@ // `startTime` start time // // `wcc` optional WC config -// func NewElapsed(style TimeStyle, startTime time.Time, wcc ...WC) Decorator { var msg string producer := chooseTimeProducer(style) diff --git a/decor/eta.go b/decor/eta.go index d03caa7..ec8b056 100644 --- a/decor/eta.go +++ b/decor/eta.go @@ -45,7 +45,6 @@ // `normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer] // // `wcc` optional WC config -// func MovingAverageETA(style TimeStyle, average ewma.MovingAverage, normalizer TimeNormalizer, wcc ...WC) Decorator { d := &movingAverageETA{ WC: initWC(wcc...), @@ -85,7 +84,6 @@ // `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS] // // `wcc` optional WC config -// func AverageETA(style TimeStyle, wcc ...WC) Decorator { return NewAverageETA(style, time.Now(), nil, wcc...) } @@ -99,7 +97,6 @@ // `normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer] // // `wcc` optional WC config -// func NewAverageETA(style TimeStyle, startTime time.Time, normalizer TimeNormalizer, wcc ...WC) Decorator { d := &averageETA{ WC: initWC(wcc...), diff --git a/decor/merge.go b/decor/merge.go index 8476711..cc9a512 100644 --- a/decor/merge.go +++ b/decor/merge.go @@ -10,12 +10,11 @@ // Merge wraps its decorator argument with intention to sync width // with several decorators of another bar. Visual example: // -// +----+--------+---------+--------+ -// | B1 | MERGE(D, P1, Pn) | -// +----+--------+---------+--------+ -// | B2 | D0 | D1 | Dn | -// +----+--------+---------+--------+ -// +// +----+--------+---------+--------+ +// | B1 | MERGE(D, P1, Pn) | +// +----+--------+---------+--------+ +// | B2 | D0 | D1 | Dn | +// +----+--------+---------+--------+ func Merge(decorator Decorator, placeholders ...WC) Decorator { if decorator == nil { return nil diff --git a/decor/name.go b/decor/name.go index 3af3112..31ac123 100644 --- a/decor/name.go +++ b/decor/name.go @@ -6,7 +6,6 @@ // `str` string to display // // `wcc` optional WC config -// func Name(str string, wcc ...WC) Decorator { return Any(func(Statistics) string { return str }, wcc...) } diff --git a/decor/on_abort.go b/decor/on_abort.go index 10ff670..f9a1197 100644 --- a/decor/on_abort.go +++ b/decor/on_abort.go @@ -7,7 +7,6 @@ // `decorator` Decorator to wrap // // `message` message to display on abort event -// func OnAbort(decorator Decorator, message string) Decorator { if decorator == nil { return nil diff --git a/decor/on_complete.go b/decor/on_complete.go index 2ada2b3..663ec36 100644 --- a/decor/on_complete.go +++ b/decor/on_complete.go @@ -6,7 +6,6 @@ // `decorator` Decorator to wrap // // `message` message to display on complete event -// func OnComplete(decorator Decorator, message string) Decorator { if decorator == nil { return nil diff --git a/decor/on_condition.go b/decor/on_condition.go index 74a3d96..f4626c3 100644 --- a/decor/on_condition.go +++ b/decor/on_condition.go @@ -5,7 +5,6 @@ // `decorator` Decorator // // `cond` bool -// func OnCondition(decorator Decorator, cond bool) Decorator { return Conditional(cond, decorator, nil) } @@ -15,7 +14,6 @@ // `decorator` Decorator // // `predicate` func() bool -// func OnPredicate(decorator Decorator, predicate func() bool) Decorator { return Predicative(predicate, decorator, nil) } @@ -28,7 +26,6 @@ // `a` Decorator // // `b` Decorator -// func Conditional(cond bool, a, b Decorator) Decorator { if cond { return a @@ -45,7 +42,6 @@ // `a` Decorator // // `b` Decorator -// func Predicative(predicate func() bool, a, b Decorator) Decorator { if predicate() { return a diff --git a/decor/percentage.go b/decor/percentage.go index 8006eb1..d39522f 100644 --- a/decor/percentage.go +++ b/decor/percentage.go @@ -43,7 +43,6 @@ // format="% .1f" output: "1.0 %" // format="%d" output: "1%" // format="% d" output: "1 %" -// func NewPercentage(format string, wcc ...WC) Decorator { if format == "" { format = "% d" diff --git a/decor/speed.go b/decor/speed.go index f052352..f2ba691 100644 --- a/decor/speed.go +++ b/decor/speed.go @@ -12,7 +12,6 @@ // used with SizeB1000 or SizeB1024 types, for example: // // fmt.Printf("%.1f", FmtAsSpeed(SizeB1024(2048))) -// func FmtAsSpeed(input fmt.Formatter) fmt.Formatter { return &speedFormatter{input} } @@ -57,7 +56,6 @@ // unit=UnitKiB, format="% .1f" output: "1.0 MiB/s" // unit=UnitKB, format="%.1f" output: "1.0MB/s" // unit=UnitKB, format="% .1f" output: "1.0 MB/s" -// func MovingAverageSpeed(unit int, format string, average ewma.MovingAverage, wcc ...WC) Decorator { if format == "" { format = "%.0f" @@ -119,7 +117,6 @@ // unit=UnitKiB, format="% .1f" output: "1.0 MiB/s" // unit=UnitKB, format="%.1f" output: "1.0MB/s" // unit=UnitKB, format="% .1f" output: "1.0 MB/s" -// func NewAverageSpeed(unit int, format string, startTime time.Time, wcc ...WC) Decorator { if format == "" { format = "%.0f"