diff options
Diffstat (limited to 'lib/diskio')
-rw-r--r-- | lib/diskio/file_iface.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/diskio/file_iface.go b/lib/diskio/file_iface.go index d26ffcc..a30ddb0 100644 --- a/lib/diskio/file_iface.go +++ b/lib/diskio/file_iface.go @@ -9,11 +9,15 @@ import ( "io" ) +type ReaderAt[A ~int64] interface { + ReadAt(p []byte, off A) (n int, err error) +} + type File[A ~int64] interface { Name() string Size() A - Close() error - ReadAt(p []byte, off A) (n int, err error) + io.Closer + ReaderAt[A] WriteAt(p []byte, off A) (n int, err error) } |