Use fmt.Errorf
This commit is contained in:
parent
45069d4fbb
commit
adb424ea03
11 changed files with 50 additions and 60 deletions
|
@ -210,7 +210,7 @@ func (k FlagKey) AddDepend(j Flag) (err error) {
|
|||
} else if d, ok := j.(MCQ); ok {
|
||||
_, err = DBExec("INSERT INTO exercice_flags_omcq_deps (id_flag, id_mcq_dep) VALUES (?, ?)", k.Id, d.Id)
|
||||
} else {
|
||||
err = errors.New(fmt.Sprintf("Dependancy type for key (%T) not implemented for this flag.", j))
|
||||
err = fmt.Errorf("Dependancy type for key (%T) not implemented for this flag.", j)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Reference in a new issue