MCPcopy
hub / github.com/docker/compose / computeWidth

Method computeWidth

cmd/formatter/logs.go:138–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136}
137
138func (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
150type presenter struct {
151 colors colorFunc

Callers 1

registerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected