(output string)
| 262 | } |
| 263 | |
| 264 | func (b *tailBuffer) Append(output string) { |
| 265 | if b.maxBytes == 0 || output == "" { |
| 266 | return |
| 267 | } |
| 268 | b.value += output |
| 269 | if len(b.value) > b.maxBytes { |
| 270 | b.value = b.value[len(b.value)-b.maxBytes:] |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | func (b *tailBuffer) String() string { |
| 275 | return strings.ToValidUTF8(b.value, "") |