From 0e79af96f4013d8f1d842b7dac04879a062ed37a Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Tue, 21 Aug 2018 22:22:00 -0400 Subject: Unexporting things that were never meant to be exported... Signed-off-by: Dave Henderson --- data/datasource_file.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'data/datasource_file.go') diff --git a/data/datasource_file.go b/data/datasource_file.go index e66615c0..02c9cc81 100644 --- a/data/datasource_file.go +++ b/data/datasource_file.go @@ -15,8 +15,8 @@ import ( ) func readFile(source *Source, args ...string) ([]byte, error) { - if source.FS == nil { - source.FS = vfs.OS() + if source.fs == nil { + source.fs = vfs.OS() } p := filepath.FromSlash(source.URL.Path) @@ -33,20 +33,20 @@ func readFile(source *Source, args ...string) ([]byte, error) { } // make sure we can access the file - i, err := source.FS.Stat(p) + i, err := source.fs.Stat(p) if err != nil { return nil, errors.Wrapf(err, "Can't stat %s", p) } if strings.HasSuffix(p, "/") { - source.Type = jsonArrayMimetype + source.mediaType = jsonArrayMimetype if i.IsDir() { return readFileDir(source, p) } return nil, errors.Errorf("%s is not a directory", p) } - f, err := source.FS.OpenFile(p, os.O_RDONLY, 0) + f, err := source.fs.OpenFile(p, os.O_RDONLY, 0) if err != nil { return nil, errors.Wrapf(err, "Can't open %s", p) } @@ -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 := source.fs.ReadDir(p) if err != nil { return nil, err } -- cgit v1.2.3