From 5e05dc9fb9ad3ada91466da64d20ffbf063ca93d Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 4 Feb 2023 15:03:03 -0500 Subject: replace afero module Signed-off-by: Dave Henderson --- data/datasource_git.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'data/datasource_git.go') diff --git a/data/datasource_git.go b/data/datasource_git.go index c5e5adf8..5c12da4c 100644 --- a/data/datasource_git.go +++ b/data/datasource_git.go @@ -248,17 +248,17 @@ func (g gitsource) clone(ctx context.Context, repoURL *url.URL, depth int) (bill } // read - reads the provided path out of a git repo -func (g gitsource) read(fs billy.Filesystem, path string) (string, []byte, error) { - fi, err := fs.Stat(path) +func (g gitsource) read(fsys billy.Filesystem, path string) (string, []byte, error) { + fi, err := fsys.Stat(path) if err != nil { return "", nil, fmt.Errorf("can't stat %s: %w", path, err) } if fi.IsDir() || strings.HasSuffix(path, string(filepath.Separator)) { - out, rerr := g.readDir(fs, path) + out, rerr := g.readDir(fsys, path) return jsonArrayMimetype, out, rerr } - f, err := fs.OpenFile(path, os.O_RDONLY, 0) + f, err := fsys.OpenFile(path, os.O_RDONLY, 0) if err != nil { return "", nil, fmt.Errorf("can't open %s: %w", path, err) } -- cgit v1.2.3