()
| 526 | } |
| 527 | |
| 528 | func (b *bufWriter) flush() { |
| 529 | if len(b.buf) == 0 { |
| 530 | return |
| 531 | } |
| 532 | _, err := b.file.Write(b.buf) |
| 533 | if err != nil { |
| 534 | log.Fatalf("writing %s: %v", b.name, err) |
| 535 | } |
| 536 | b.buf = b.buf[:0] |
| 537 | } |
| 538 | |
| 539 | // finish flushes the file to disk and returns an open file ready for reading. |
| 540 | func (b *bufWriter) finish() *os.File { |
no outgoing calls
no test coverage detected