aboutsummaryrefslogtreecommitdiff
path: root/format/packfile/ingest/file_section_writer.go
diff options
context:
space:
mode:
Diffstat (limited to 'format/packfile/ingest/file_section_writer.go')
-rw-r--r--format/packfile/ingest/file_section_writer.go22
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
-}