Avoid Atoi to avoid int convertion

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

View file

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