BarFillerTrim same as TrimSpace but for better discoverability
Vladimir Bauer
5 years ago
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | // TrimSpace trims bar's edge spaces. | |
| 125 | // BarFillerTrim bar filler is rendered with leading and trailing space | |
| 126 | // like ' [===] ' by default. With this option leading and trailing | |
| 127 | // space will be removed. | |
| 128 | func BarFillerTrim() BarOption { | |
| 129 | return func(s *bState) { | |
| 130 | s.trimSpace = true | |
| 131 | } | |
| 132 | } | |
| 133 | ||
| 134 | // TrimSpace is an alias to BarFillerTrim. | |
| 126 | 135 | func TrimSpace() BarOption { |
| 127 | return func(s *bState) { | |
| 128 | s.trimSpace = true | |
| 129 | } | |
| 136 | return BarFillerTrim() | |
| 130 | 137 | } |
| 131 | 138 | |
| 132 | 139 | // BarStyle overrides mpb.DefaultBarStyle which is "[=>-]<+". |