Implement flag type 'text': this is like keys, but on multiple lines

This commit is contained in:
nemunaire 2020-01-16 15:33:28 +01:00
parent 8f998485bb
commit 47ba134b55
9 changed files with 30 additions and 14 deletions

View file

@ -325,6 +325,7 @@ type uploadedFlag struct {
Label string
Help string
IgnoreCase bool
Multiline bool
ValidatorRe *string `json:"validator_regexp"`
Flag string
Value []byte
@ -346,7 +347,7 @@ func createExerciceFlag(exercice fic.Exercice, body []byte) (interface{}, error)
vre = uk.ValidatorRe
}
return exercice.AddRawFlagKey(uk.Label, uk.Help, uk.IgnoreCase, vre, []byte(uk.Flag), uk.ChoicesCost)
return exercice.AddRawFlagKey(uk.Label, uk.Help, uk.IgnoreCase, uk.Multiline, vre, []byte(uk.Flag), uk.ChoicesCost)
}
func showExerciceFlag(flag fic.FlagKey, _ fic.Exercice, body []byte) (interface{}, error) {