Flush flushes the in-memory write buffer to the underlying file. Call before closing the file at the end of a run.
()
| 429 | // Flush flushes the in-memory write buffer to the underlying file. |
| 430 | // Call before closing the file at the end of a run. |
| 431 | func (s *DebugFileSink) Flush() error { |
| 432 | if s == nil || s.buffered == nil { |
| 433 | return nil |
| 434 | } |
| 435 | return s.buffered.Sync() |
| 436 | } |
| 437 | |
| 438 | // Capped reports whether the sink dropped any bytes due to its cap. |
| 439 | // Call after Flush at end-of-run to populate bundle metadata. |