From 6c16733dfd54a821948866983ec5e2503d832afc Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Tue, 27 Aug 2024 15:15:27 +0200 Subject: [PATCH] fs: remove unused methods from File interface --- internal/fs/fs_reader.go | 8 -------- internal/fs/interface.go | 2 -- 2 files changed, 10 deletions(-) diff --git a/internal/fs/fs_reader.go b/internal/fs/fs_reader.go index 9dd5ff6eb..490a6b68d 100644 --- a/internal/fs/fs_reader.go +++ b/internal/fs/fs_reader.go @@ -229,18 +229,10 @@ type fakeFile struct { // ensure that fakeFile implements File var _ File = fakeFile{} -func (f fakeFile) Fd() uintptr { - return 0 -} - func (f fakeFile) Readdirnames(_ int) ([]string, error) { return nil, pathError("readdirnames", f.name, os.ErrInvalid) } -func (f fakeFile) Seek(int64, int) (int64, error) { - return 0, pathError("seek", f.name, os.ErrInvalid) -} - func (f fakeFile) Read(_ []byte) (int, error) { return 0, pathError("read", f.name, os.ErrInvalid) } diff --git a/internal/fs/interface.go b/internal/fs/interface.go index 7707abd1d..dcd16a0b3 100644 --- a/internal/fs/interface.go +++ b/internal/fs/interface.go @@ -29,9 +29,7 @@ type File interface { io.Reader io.Closer - Fd() uintptr Readdirnames(n int) ([]string, error) - Seek(int64, int) (int64, error) Stat() (os.FileInfo, error) Name() string }