Implement number flags
This commit is contained in:
parent
30d0afe43f
commit
c3742ade4e
6 changed files with 104 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Reference in a new issue