Adding subdir support
This commit is contained in:
parent
e050e82b2d
commit
1e9893cfc2
@ -35,6 +35,14 @@ func ListContent(dir string) ([]Content, error) {
|
||||
}
|
||||
|
||||
for _, e := range entries {
|
||||
if e.IsDir() {
|
||||
subres, err := ListContent(path.Join(dir, e.Name()))
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
res = append(res, subres...)
|
||||
}
|
||||
|
||||
if(!strings.HasSuffix(e.Name(), ".json")) {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user