Avoid Atoi to avoid int convertion
This commit is contained in:
parent
8702db568c
commit
0f48b27a04
11 changed files with 32 additions and 39 deletions
|
@ -115,7 +115,7 @@ func bindingFiles(_ httprouter.Params, body []byte) (interface{}, error) {
|
|||
}
|
||||
|
||||
func getExercice(args []string) (fic.Exercice, error) {
|
||||
if tid, err := strconv.Atoi(string(args[0])); err != nil {
|
||||
if tid, err := strconv.ParseInt(string(args[0]), 10, 64); err != nil {
|
||||
return fic.Exercice{}, err
|
||||
} else if theme, err := fic.GetTheme(tid); err != nil {
|
||||
return fic.Exercice{}, err
|
||||
|
|
Reference in a new issue