Local fetcher: properly return VFS

This commit is contained in:
wpetit 2020-04-07 08:43:59 +02:00
parent 49117d619a
commit 9f1538fed4
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"gopkg.in/src-d/go-billy.v4/osfs"
"gopkg.in/src-d/go-billy.v4" "gopkg.in/src-d/go-billy.v4"
) )
@ -13,7 +15,7 @@ const FileScheme = "file"
type LocalFetcher struct{} type LocalFetcher struct{}
func (f *LocalFetcher) Fetch(url *url.URL) (billy.Filesystem, error) { func (f *LocalFetcher) Fetch(url *url.URL) (billy.Filesystem, error) {
return nil, nil return osfs.New(url.Path), nil
} }
func (f *LocalFetcher) Match(url *url.URL) bool { func (f *LocalFetcher) Match(url *url.URL) bool {