reduce nfs file interface
All checks were successful
docker / build-docker (linux/arm64) (push) Successful in 2m32s
docker / build-docker (linux/amd64) (push) Successful in 2m35s

This commit is contained in:
royalcat 2024-07-16 23:58:22 +03:00
parent f9311284fc
commit 633a1d6e25
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ type File interface {
// Name returns the name of the file as presented to Open. // Name returns the name of the file as presented to Open.
Name() string Name() string
ctxio.Writer ctxio.Writer
ctxio.Reader // ctxio.Reader
ctxio.ReaderAt ctxio.ReaderAt
io.Seeker io.Seeker
ctxio.Closer ctxio.Closer

View file

@ -89,7 +89,7 @@ func TestNFS(t *testing.T) {
} }
mf, _ := mem.OpenFile(ctx, "/helloworld.txt", os.O_RDONLY, 0) mf, _ := mem.OpenFile(ctx, "/helloworld.txt", os.O_RDONLY, 0)
buf := make([]byte, len(b)) 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) t.Fatal(err)
} }
if !bytes.Equal(buf, b) { if !bytes.Equal(buf, b) {