(maxNameLength int, showTimestamps bool)
| 32 | } |
| 33 | |
| 34 | func newMultiOutput(maxNameLength int, showTimestamps bool) *multiOutput { |
| 35 | o := multiOutput{ |
| 36 | maxNameLength: utils.Max(maxNameLength, 6), |
| 37 | showTimestamps: showTimestamps, |
| 38 | ch: make(chan *bytes.Buffer, 128), |
| 39 | done: make(chan struct{}), |
| 40 | echoes: make(map[int64]io.Writer), |
| 41 | bufPool: sync.Pool{ |
| 42 | New: func() interface{} { return new(bytes.Buffer) }, |
| 43 | }, |
| 44 | } |
| 45 | |
| 46 | go o.listen() |
| 47 | |
| 48 | return &o |
| 49 | } |
| 50 | |
| 51 | func (o *multiOutput) Offset() int { |
| 52 | of := o.maxNameLength + len(outputSeparator) |
no test coverage detected
searching dependent graphs…