Counters doc comment
Vladimir Bauer
8 years ago
| 59 | 59 | return DynamicName(nameFn, minWidth, conf) |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | // DynamicName to be used, when there is a plan to chane the name once or | |
| 62 | // DynamicName to be used, when there is a plan to change the name once or | |
| 63 | 63 | // several times during progress rendering process |
| 64 | 64 | func DynamicName(nameFn func(*Statistics) string, minWidth int, conf byte) DecoratorFunc { |
| 65 | 65 | format := "%%" |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | // Counters provides basic counters decorator. | |
| 85 | // Accepts pairFormat string, something like "%s / %s" to be used in | |
| 86 | // fmt.Sprintf(pairFormat, current, total) and one of (Unit_KiB/Unit_kB) | |
| 87 | // constant | |
| 84 | 88 | func Counters(pairFormat string, unit Units, minWidth int, conf byte) DecoratorFunc { |
| 85 | 89 | format := "%%" |
| 86 | 90 | if (conf & DidentRight) != 0 { |