package sync import ( "srs.epita.fr/fic-server/libfic" ) func SyncDeep(i Importer) map[string][]string { errs := map[string][]string{} errs["_themes"] = SyncThemes(i) if themes, err := fic.GetThemes(); err == nil { for _, theme := range themes { errs[theme.Name] = SyncExercices(i, theme) if exercices, err := theme.GetExercices(); err == nil { for _, exercice := range exercices { errs[theme.Name] = append(errs[theme.Name], SyncExerciceFiles(i, exercice)...) errs[theme.Name] = append(errs[theme.Name], SyncExerciceHints(i, exercice)...) errs[theme.Name] = append(errs[theme.Name], SyncExerciceKeys(i, exercice)...) } } } } return errs }