Implement label only flag
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b98e23d060
commit
01b05aaed0
9 changed files with 311 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue