Skip to content

Commit b50bc97

Browse files
committed
Rename Wrap to New
1 parent b8c5b1b commit b50bc97

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

helper/iofs/iofs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
// Wrap adapts a billy.Filesystem to a io.fs.FS.
15-
func Wrap(fs billyfs.Basic) fs.FS {
15+
func New(fs billyfs.Basic) fs.FS {
1616
return &adapterFs{fs: polyfill.New(fs)}
1717
}
1818

helper/iofs/iofs_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type wrappedError interface {
2525
func TestWithFSTest(t *testing.T) {
2626
t.Parallel()
2727
memfs := memfs.New()
28-
iofs := Wrap(memfs)
28+
iofs := New(memfs)
2929

3030
files := map[string]string{
3131
"foo.txt": "hello, world",
@@ -51,7 +51,7 @@ func TestWithFSTest(t *testing.T) {
5151
func TestDeletes(t *testing.T) {
5252
t.Parallel()
5353
memfs := memfs.New()
54-
iofs := Wrap(memfs).(fs.ReadFileFS)
54+
iofs := New(memfs).(fs.ReadFileFS)
5555

5656
makeFile(memfs, t, "foo.txt", "hello, world")
5757
makeFile(memfs, t, "deleted", "nothing to see")

0 commit comments

Comments
 (0)