diff options
| author | 2026-03-30 14:28:13 +0000 | |
|---|---|---|
| committer | 2026-03-30 14:28:13 +0000 | |
| commit | a4eeb727468a178a4de0dfc718828f26740484ac (patch) | |
| tree | 4318d38d49facc80e2e2186f5919fa656be3b31f /format/packfile/ingest/file_section_writer.go | |
| parent | object/store/packed: Make store own root, algo, opts (diff) | |
| signature | No signature | |
object,store/packed{,/internal/ingest}: Move from format/packfile/ingest
Diffstat (limited to 'format/packfile/ingest/file_section_writer.go')
| -rw-r--r-- | format/packfile/ingest/file_section_writer.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/format/packfile/ingest/file_section_writer.go b/format/packfile/ingest/file_section_writer.go deleted file mode 100644 index fa28c1a9..00000000 --- a/format/packfile/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 -} |
