Typo fixes.
Vladimir Bauer
8 years ago
| 62 | 62 | |
| 63 | 63 | // DynamicName to be used, when there is a plan to change the name once or |
| 64 | 64 | // several times during progress rendering process. If there're more than one |
| 65 | // bar, and you'd like to synchronize column width, conf param shauld have | |
| 65 | // bar, and you'd like to synchronize column width, conf param should have | |
| 66 | 66 | // DwidthSync bit set. |
| 67 | 67 | func DynamicName(nameFn func(*Statistics) string, minWidth int, conf byte) DecoratorFunc { |
| 68 | 68 | format := "%%" |
| 88 | 88 | // Accepts pairFormat string, something like "%s / %s" to be used in |
| 89 | 89 | // fmt.Sprintf(pairFormat, current, total) and one of (Unit_KiB/Unit_kB) |
| 90 | 90 | // constant. If there're more than one bar, and you'd like to synchronize column |
| 91 | // width, conf param shauld have DwidthSync bit set. | |
| 91 | // width, conf param should have DwidthSync bit set. | |
| 92 | 92 | func Counters(pairFormat string, unit Units, minWidth int, conf byte) DecoratorFunc { |
| 93 | 93 | format := "%%" |
| 94 | 94 | if (conf & DidentRight) != 0 { |
| 113 | 113 | |
| 114 | 114 | // ETA provides exponential-weighted-moving-average ETA decorator. |
| 115 | 115 | // If there're more than one bar, and you'd like to synchronize column width, |
| 116 | // conf param shauld have DwidthSync bit set. | |
| 116 | // conf param should have DwidthSync bit set. | |
| 117 | 117 | func ETA(minWidth int, conf byte) DecoratorFunc { |
| 118 | 118 | format := "%%" |
| 119 | 119 | if (conf & DidentRight) != 0 { |
| 136 | 136 | |
| 137 | 137 | // Elapsed provides elapsed time decorator. |
| 138 | 138 | // If there're more than one bar, and you'd like to synchronize column width, |
| 139 | // conf param shauld have DwidthSync bit set. | |
| 139 | // conf param should have DwidthSync bit set. | |
| 140 | 140 | func Elapsed(minWidth int, conf byte) DecoratorFunc { |
| 141 | 141 | format := "%%" |
| 142 | 142 | if (conf & DidentRight) != 0 { |
| 159 | 159 | |
| 160 | 160 | // Percentage provides percentage decorator. |
| 161 | 161 | // If there're more than one bar, and you'd like to synchronize column width, |
| 162 | // conf param shauld have DwidthSync bit set. | |
| 162 | // conf param should have DwidthSync bit set. | |
| 163 | 163 | func Percentage(minWidth int, conf byte) DecoratorFunc { |
| 164 | 164 | format := "%%" |
| 165 | 165 | if (conf & DidentRight) != 0 { |