Implement label only flag
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-01-21 13:06:37 +01:00
commit 01b05aaed0
9 changed files with 311 additions and 11 deletions

View file

@ -6,7 +6,7 @@ import (
"strings"
)
type FlagLabel struct {
type FlagMCQLabel struct {
Label string
IdChoice int
}
@ -17,7 +17,7 @@ func (k FlagKey) IsMCQJustification() bool {
}
// GetMCQJustification returns the structure corresponding to the given flag.
func (k FlagKey) GetMCQJustification() (fl FlagLabel, err error) {
func (k FlagKey) GetMCQJustification() (fl FlagMCQLabel, err error) {
spl := strings.Split(k.Label, "%")
if len(spl) >= 3 && len(spl[0]) == 0 {
var idChoice int64