Add glob support in edit add resource

This commit is contained in:
Jingfang Liu
2018-07-31 10:58:14 -07:00
parent 6a834b6262
commit 1b7171ac9e
10 changed files with 84 additions and 83 deletions

View File

@@ -109,13 +109,3 @@ func (l *fileLoader) Load(location string) ([]byte, error) {
}
return l.fSys.ReadFile(fullLocation)
}
// GlobLoad returns the map from path to bytes from reading a glob path.
// Implements the Loader interface.
func (l *fileLoader) GlobLoad(location string) (map[string][]byte, error) {
fullLocation, err := l.fullLocation(l.root, location)
if err != nil {
return nil, err
}
return l.fSys.ReadFiles(fullLocation)
}