sync: Make value lowercase if flag is not case sensitive

This commit is contained in:
nemunaire 2021-11-20 18:03:53 +01:00
parent 63423c9c69
commit 8a6d480d17
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ func buildKeyFlag(exercice fic.Exercice, flag ExerciceFlag, flagline int, defaul
}
choice.Label = prep + choice.Label
if !flag.CaseSensitive {
val = strings.ToLower(val)
}
choices = append(choices, fic.FlagChoice{
Label: choice.Label,
Value: val,