Local fetcher: properly return VFS
This commit is contained in:
parent
49117d619a
commit
9f1538fed4
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue