()
| 136 | } |
| 137 | |
| 138 | func (l *logConsumer) computeWidth() { |
| 139 | width := 0 |
| 140 | l.presenters.Range(func(key, value any) bool { |
| 141 | p := value.(*presenter) |
| 142 | if len(p.name) > width { |
| 143 | width = len(p.name) |
| 144 | } |
| 145 | return true |
| 146 | }) |
| 147 | l.width = width + 1 |
| 148 | } |
| 149 | |
| 150 | type presenter struct { |
| 151 | colors colorFunc |