From b50bc97051ea4bdfef26dd45fdc00d6611483f0b Mon Sep 17 00:00:00 2001 From: Evan Anderson Date: Fri, 27 Sep 2024 09:32:57 +0200 Subject: [PATCH] Rename Wrap to New --- helper/iofs/iofs.go | 2 +- helper/iofs/iofs_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helper/iofs/iofs.go b/helper/iofs/iofs.go index eb5a4b4..be8f348 100644 --- a/helper/iofs/iofs.go +++ b/helper/iofs/iofs.go @@ -12,7 +12,7 @@ import ( ) // Wrap adapts a billy.Filesystem to a io.fs.FS. -func Wrap(fs billyfs.Basic) fs.FS { +func New(fs billyfs.Basic) fs.FS { return &adapterFs{fs: polyfill.New(fs)} } diff --git a/helper/iofs/iofs_test.go b/helper/iofs/iofs_test.go index e9bfd8c..02d25de 100644 --- a/helper/iofs/iofs_test.go +++ b/helper/iofs/iofs_test.go @@ -25,7 +25,7 @@ type wrappedError interface { func TestWithFSTest(t *testing.T) { t.Parallel() memfs := memfs.New() - iofs := Wrap(memfs) + iofs := New(memfs) files := map[string]string{ "foo.txt": "hello, world", @@ -51,7 +51,7 @@ func TestWithFSTest(t *testing.T) { func TestDeletes(t *testing.T) { t.Parallel() memfs := memfs.New() - iofs := Wrap(memfs).(fs.ReadFileFS) + iofs := New(memfs).(fs.ReadFileFS) makeFile(memfs, t, "foo.txt", "hello, world") makeFile(memfs, t, "deleted", "nothing to see")