aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/afero/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/afero/README.md')
-rw-r--r--vendor/github.com/spf13/afero/README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md
index db20817..d9e3327 100644
--- a/vendor/github.com/spf13/afero/README.md
+++ b/vendor/github.com/spf13/afero/README.md
@@ -198,17 +198,17 @@ independent, with no test relying on the state left by an earlier test.
Then in my tests I would initialize a new MemMapFs for each test:
```go
func TestExist(t *testing.T) {
- appFS = afero.NewMemMapFs()
+ appFS := afero.NewMemMapFs()
// create test files and directories
- appFS.MkdirAll("src/a", 0755))
+ appFS.MkdirAll("src/a", 0755)
afero.WriteFile(appFS, "src/a/b", []byte("file b"), 0644)
afero.WriteFile(appFS, "src/c", []byte("file c"), 0644)
- _, err := appFS.Stat("src/c")
+ name := "src/c"
+ _, err := appFS.Stat(name)
if os.IsNotExist(err) {
- t.Errorf("file \"%s\" does not exist.\n", name)
+ t.Errorf("file \"%s\" does not exist.\n", name)
}
}
-
```
# Available Backends