admin&sync: insert format helper in database

This commit is contained in:
nemunaire 2018-09-09 22:28:39 +02:00 committed by Pierre-Olivier Mercier
parent 971273a185
commit 2a6fbd4e32
6 changed files with 22 additions and 17 deletions

View file

@ -40,7 +40,7 @@ func SyncExerciceKeys(i Importer, exercice fic.Exercice) (errs []string) {
errs = append(errs, fmt.Sprintf("%q: WARNING flag #%d: non-printable characters in flag, is this really expected?", path.Base(exercice.Path), nline + 1))
}
if k, err := exercice.AddRawKey(flag.Label, flag.Raw); err != nil {
if k, err := exercice.AddRawKey(flag.Label, flag.Help, flag.Raw); err != nil {
errs = append(errs, fmt.Sprintf("%q: error flag #%d: %s", path.Base(exercice.Path), nline + 1, err))
continue
} else {
@ -67,7 +67,7 @@ func SyncExerciceKeys(i Importer, exercice fic.Exercice) (errs []string) {
errs = append(errs, fmt.Sprintf("%q: WARNING flag UCQ #%d: non-printable characters in flag, is this really expected?", path.Base(exercice.Path), nline + 1))
}
if k, err := exercice.AddRawKey(flag.Label, flag.Raw); err != nil {
if k, err := exercice.AddRawKey(flag.Label, flag.Help, flag.Raw); err != nil {
errs = append(errs, fmt.Sprintf("%q: error flag UCQ #%d: %s", path.Base(exercice.Path), nline + 1, err))
continue
} else {