refactor formatLen
Vladimir Bauer
9 years ago
| 21 | 21 |
// WithFormat overrides default bar format "[=>-]"
|
| 22 | 22 |
func WithFormat(format string) ProgressOption {
|
| 23 | 23 |
return func(c *pConf) {
|
| 24 | |
if utf8.RuneCountInString(format) == numFmtRunes {
|
|
24 |
if utf8.RuneCountInString(format) == formatLen {
|
| 25 | 25 |
c.format = format
|
| 26 | 26 |
}
|
| 27 | 27 |
}
|