Avoid Atoi to avoid int convertion

This commit is contained in:
nemunaire 2018-12-01 16:15:28 +01:00
commit 0f48b27a04
11 changed files with 32 additions and 39 deletions

View file

@ -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
}