From 633a1d6e2518fd12f61eb63d994fb3243362cefd Mon Sep 17 00:00:00 2001 From: royalcat Date: Tue, 16 Jul 2024 23:58:22 +0300 Subject: [PATCH] reduce nfs file interface --- pkg/go-nfs/filesystem.go | 2 +- pkg/go-nfs/nfs_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/go-nfs/filesystem.go b/pkg/go-nfs/filesystem.go index 2207173..22e04c2 100644 --- a/pkg/go-nfs/filesystem.go +++ b/pkg/go-nfs/filesystem.go @@ -70,7 +70,7 @@ type File interface { // Name returns the name of the file as presented to Open. Name() string ctxio.Writer - ctxio.Reader + // ctxio.Reader ctxio.ReaderAt io.Seeker ctxio.Closer diff --git a/pkg/go-nfs/nfs_test.go b/pkg/go-nfs/nfs_test.go index e0a9b36..a63c297 100644 --- a/pkg/go-nfs/nfs_test.go +++ b/pkg/go-nfs/nfs_test.go @@ -89,7 +89,7 @@ func TestNFS(t *testing.T) { } mf, _ := mem.OpenFile(ctx, "/helloworld.txt", os.O_RDONLY, 0) buf := make([]byte, len(b)) - if _, err = mf.Read(ctx, buf[:]); err != nil { + if _, err = mf.ReadAt(ctx, buf[:], 0); err != nil { t.Fatal(err) } if !bytes.Equal(buf, b) {