Implement number flags

This commit is contained in:
nemunaire 2021-11-12 21:36:27 +01:00
commit c3742ade4e
6 changed files with 104 additions and 5 deletions

View file

@ -111,13 +111,14 @@ func ExecValidatorRegexp(vre string, val []byte, ignorecase bool) ([]byte, error
}
// AddRawFlagKey creates and fills a new struct FlagKey, from a non-hashed flag, and registers it into the database.
func (e Exercice) AddRawFlagKey(name string, placeholder string, ignorecase bool, multiline bool, validator_regexp *string, raw_value []byte, choicescost int64) (f FlagKey, err error) {
func (e Exercice) AddRawFlagKey(name string, t string, placeholder string, ignorecase bool, multiline bool, validator_regexp *string, raw_value []byte, choicescost int64) (f FlagKey, err error) {
hash, errr := ComputeHashedFlag(raw_value, ignorecase, validator_regexp)
if errr != nil {
return f, err
}
f = FlagKey{
Type: t,
Label: name,
Placeholder: placeholder,
IgnoreCase: ignorecase,