Function
bufferFor
(buffers map[testKey]*tailBuffer, key testKey, maxOutputBytes int)
Source from the content-addressed store, hash-verified
| 253 | } |
| 254 | |
| 255 | func bufferFor(buffers map[testKey]*tailBuffer, key testKey, maxOutputBytes int) *tailBuffer { |
| 256 | buffer := buffers[key] |
| 257 | if buffer == nil { |
| 258 | buffer = &tailBuffer{maxBytes: maxOutputBytes} |
| 259 | buffers[key] = buffer |
| 260 | } |
| 261 | return buffer |
| 262 | } |
| 263 | |
| 264 | func (b *tailBuffer) Append(output string) { |
| 265 | if b.maxBytes == 0 || output == "" { |
Tested by
no test coverage detected