refactor: Use explicit interface instead of os.File for drive backend

This commit is contained in:
Felicitas Pojtinger
2022-01-07 22:27:14 +01:00
parent 314e60f9b1
commit f45f8b1499
9 changed files with 32 additions and 29 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"io"
"io/fs"
"os"
"time"
)
@@ -18,8 +17,13 @@ type DriveWriterConfig struct {
DriveIsRegular bool
}
type Drive interface {
io.ReadSeeker
Fd() uintptr
}
type DriveConfig struct {
Drive *os.File
Drive Drive
DriveIsRegular bool
}