diff --git a/decor/speed.go b/decor/speed.go index d41e38b..122c759 100644 --- a/decor/speed.go +++ b/decor/speed.go @@ -133,6 +133,10 @@ // as it will be closed automatically on bar completion event. // // `wcc` optional WC config +// +// unitFormat example if UnitKiB choosen: +// +// "%.1f" = "1.0MiB/s" or "% .1f" = "1.0 MiB/s" func EwmaSpeed(unit int, unitFormat string, age float64, sb chan time.Time, wcc ...WC) Decorator { return MovingAverageSpeed(unit, unitFormat, ewma.NewMovingAverage(age), sb, wcc...) } @@ -237,6 +241,10 @@ // `unitFormat` printf compatible verb for value, like "%f" or "%d" // // `wcc` optional WC config +// +// unitFormat example if UnitKiB choosen: +// +// "%.1f" = "1.0MiB/s" or "% .1f" = "1.0 MiB/s" func AverageSpeed(unit int, unitFormat string, wcc ...WC) Decorator { var wc WC for _, widthConf := range wcc {