(switcher bool)
| 199 | } |
| 200 | |
| 201 | func MockFileSystem(switcher bool) afero.Fs { |
| 202 | if switcher { |
| 203 | fmt.Println("Using mocked file system") |
| 204 | fileSystem = afero.NewMemMapFs() |
| 205 | return fileSystem |
| 206 | } else { |
| 207 | fmt.Println("Using OS file system. Make sure to clean up your disk!") |
| 208 | fileSystem = afero.NewOsFs() |
| 209 | return fileSystem |
| 210 | } |
| 211 | } |
no outgoing calls