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
commit 47ba134b55
9 changed files with 30 additions and 14 deletions

View file

@ -33,6 +33,7 @@ type myTeamFlag struct {
NbLines uint64 `json:"nb_lines,omitempty"`
IgnoreOrder bool `json:"ignore_order,omitempty"`
IgnoreCase bool `json:"ignore_case,omitempty"`
Multiline bool `json:"multiline,omitempty"`
ValidatorRe *string `json:"validator_regexp,omitempty"`
Solved *time.Time `json:"found,omitempty"`
Soluce string `json:"soluce,omitempty"`
@ -201,6 +202,8 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
flag.Solved = t.HasPartiallySolved(k)
}
flag.Multiline = k.Multiline
var fl FlagLabel
if fl, err = k.GetMCQJustification(); err == nil {
k.Label = fl.Label