Skip to content

Commit

Permalink
refactor: rename fs
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Feb 4, 2021
1 parent 1c62da4 commit 03e0a2d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,19 +317,17 @@ func TestQuoteMeta(t *testing.T) {
func testFs(tb testing.TB, files, dirs []string) afero.Fs {
tb.Helper()

fs := afero.NewMemMapFs()
tmpfs := afero.NewMemMapFs()

for _, file := range files {
if _, err := fs.Create(filepath.FromSlash(file)); err != nil {
if _, err := tmpfs.Create(filepath.FromSlash(file)); err != nil {
require.NoError(tb, err)
}
}

for _, dir := range dirs {
if err := fs.MkdirAll(filepath.FromSlash(dir), 0o664); err != nil {
require.NoError(tb, err)
}
require.NoError(tb, tmpfs.MkdirAll(filepath.FromSlash(dir), 0o664))
}

return fs
return tmpfs
}

0 comments on commit 03e0a2d

Please sign in to comment.