diff options
| author | 2026-03-10 14:07:54 +0800 | |
|---|---|---|
| committer | 2026-03-10 14:07:54 +0800 | |
| commit | c2cb06aa23a1769a0d84756acccf1ac1358f61ef (patch) | |
| tree | 86d991b67542dd8e8509a74c832b749ccf948342 /format/pack/ingest/file_section_writer.go | |
| parent | commitgraph: Move out of format/ (diff) | |
| signature | No signature | |
*: format/pack -> packfile; format/delta -> delta; delete format
Diffstat (limited to 'format/pack/ingest/file_section_writer.go')
| -rw-r--r-- | format/pack/ingest/file_section_writer.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/format/pack/ingest/file_section_writer.go b/format/pack/ingest/file_section_writer.go deleted file mode 100644 index fa28c1a9..00000000 --- a/format/pack/ingest/file_section_writer.go +++ /dev/null @@ -1,22 +0,0 @@ -package ingest - -import "os" - -// fileSectionWriter writes sequentially to file via WriteAt at one base offset. -type fileSectionWriter struct { - file *os.File - off int64 - pos int64 -} - -// Write writes src at current section position. -func (writer *fileSectionWriter) Write(src []byte) (int, error) { - if len(src) == 0 { - return 0, nil - } - - n, err := writer.file.WriteAt(src, writer.off+writer.pos) - writer.pos += int64(n) - - return n, err -} |
