godoc refactoring: width
Vladimir Bauer
8 years ago
| 53 | 53 | // |
| 54 | 54 | // `fn` DecoratorFunc to wrap |
| 55 | 55 | // |
| 56 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 56 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 57 | 57 | // |
| 58 | 58 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 59 | 59 | func OnComplete(fn DecoratorFunc, message string, width, conf int) DecoratorFunc { |
| 70 | 70 | // |
| 71 | 71 | // `name` string to display |
| 72 | 72 | // |
| 73 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 73 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 74 | 74 | // |
| 75 | 75 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 76 | 76 | func StaticName(name string, width, conf int) DecoratorFunc { |
| 84 | 84 | // |
| 85 | 85 | // `messageFn` callback function to get dynamic string message |
| 86 | 86 | // |
| 87 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 87 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 88 | 88 | // |
| 89 | 89 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 90 | 90 | func DynamicName(messageFn func(*Statistics) string, width, conf int) DecoratorFunc { |
| 111 | 111 | // |
| 112 | 112 | // `pairFormat` printf compatible verbs for current and total, like "%f" or "%d" |
| 113 | 113 | // |
| 114 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 114 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 115 | 115 | // |
| 116 | 116 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 117 | 117 | func CountersNoUnit(pairFormat string, width, conf int) DecoratorFunc { |
| 122 | 122 | // |
| 123 | 123 | // `pairFormat` printf compatible verbs for current and total, like "%f" or "%d" |
| 124 | 124 | // |
| 125 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 125 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 126 | 126 | // |
| 127 | 127 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 128 | 128 | // |
| 137 | 137 | // |
| 138 | 138 | // `pairFormat` printf compatible verbs for current and total, like "%f" or "%d" |
| 139 | 139 | // |
| 140 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 140 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 141 | 141 | // |
| 142 | 142 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 143 | 143 | // |
| 178 | 178 | |
| 179 | 179 | // ETA returns exponential-weighted-moving-average ETA decorator. |
| 180 | 180 | // |
| 181 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 181 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 182 | 182 | // |
| 183 | 183 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 184 | 184 | func ETA(width, conf int) DecoratorFunc { |
| 203 | 203 | |
| 204 | 204 | // Elapsed returns elapsed time decorator. |
| 205 | 205 | // |
| 206 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 206 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 207 | 207 | // |
| 208 | 208 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 209 | 209 | func Elapsed(width, conf int) DecoratorFunc { |
| 228 | 228 | |
| 229 | 229 | // Percentage returns percentage decorator. |
| 230 | 230 | // |
| 231 | // `width` width to apply, if `DwidthSync` bit is not set | |
| 231 | // `width` width reservation to apply, ignored if `DwidthSync` bit is set | |
| 232 | 232 | // |
| 233 | 233 | // `conf` bit set config, [DidentRight|DwidthSync|DextraSpace] |
| 234 | 234 | func Percentage(width, conf int) DecoratorFunc { |