Skip to content

Commit

Permalink
Rename Wrap to New
Browse files Browse the repository at this point in the history
  • Loading branch information
evankanderson committed Sep 27, 2024
1 parent b8c5b1b commit b50bc97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helper/iofs/iofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
}

Expand Down
4 changes: 2 additions & 2 deletions helper/iofs/iofs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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")
Expand Down

0 comments on commit b50bc97

Please sign in to comment.