admin: Export more importer functions
This commit is contained in:
parent
092256d9e5
commit
1f833d39fc
7 changed files with 26 additions and 26 deletions
|
|
@ -31,11 +31,11 @@ func GetExercices(i Importer, theme *fic.Theme) ([]string, error) {
|
|||
|
||||
if len(theme.Path) == 0 {
|
||||
return []string{}, nil
|
||||
} else if dirs, err := i.listDir(theme.Path); err != nil {
|
||||
} else if dirs, err := i.ListDir(theme.Path); err != nil {
|
||||
return []string{}, err
|
||||
} else {
|
||||
for _, dir := range dirs {
|
||||
if _, err := i.listDir(path.Join(theme.Path, dir)); err == nil {
|
||||
if _, err := i.ListDir(path.Join(theme.Path, dir)); err == nil {
|
||||
if dir[0] != '.' && strings.Contains(dir, "-") {
|
||||
exercices = append(exercices, dir)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue