Avoid Atoi to avoid int convertion
This commit is contained in:
parent
8702db568c
commit
0f48b27a04
11 changed files with 32 additions and 39 deletions
|
|
@ -40,7 +40,7 @@ func (f Flag) GetChoices() ([]FlagChoice, error) {
|
|||
}
|
||||
|
||||
// GetChoice returns a choice for the given Flag.
|
||||
func (f Flag) GetChoice(id int) (c FlagChoice, err error) {
|
||||
func (f Flag) GetChoice(id int64) (c FlagChoice, err error) {
|
||||
if errr := DBQueryRow("SELECT id_choice, id_flag, label, response FROM flag_choices WHERE id_choice = ?", id).Scan(&c.Id, &c.IdFlag, &c.Label, &c.Value); errr != nil {
|
||||
return c, errr
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue