summaryrefslogtreecommitdiff
path: root/data/datasource_file.go
diff options
context:
space:
mode:
Diffstat (limited to 'data/datasource_file.go')
-rw-r--r--data/datasource_file.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/datasource_file.go b/data/datasource_file.go
index 93367cc5..a94944cd 100644
--- a/data/datasource_file.go
+++ b/data/datasource_file.go
@@ -9,14 +9,14 @@ import (
"path/filepath"
"strings"
- "github.com/pkg/errors"
+ "github.com/spf13/afero"
- "github.com/blang/vfs"
+ "github.com/pkg/errors"
)
func readFile(source *Source, args ...string) ([]byte, error) {
if source.fs == nil {
- source.fs = vfs.OS()
+ source.fs = afero.NewOsFs()
}
p := filepath.FromSlash(source.URL.Path)
@@ -59,7 +59,7 @@ func readFile(source *Source, args ...string) ([]byte, error) {
}
func readFileDir(source *Source, p string) ([]byte, error) {
- names, err := source.fs.ReadDir(p)
+ names, err := afero.ReadDir(source.fs, p)
if err != nil {
return nil, err
}