finish flushes the file to disk and returns an open file ready for reading.
()
| 538 | |
| 539 | // finish flushes the file to disk and returns an open file ready for reading. |
| 540 | func (b *bufWriter) finish() *os.File { |
| 541 | b.flush() |
| 542 | f := b.file |
| 543 | f.Seek(0, 0) |
| 544 | return f |
| 545 | } |
| 546 | |
| 547 | func (b *bufWriter) writeTrigram(t uint32) { |
| 548 | if cap(b.buf)-len(b.buf) < 3 { |