Skip to content

Commit

Permalink
Merge pull request #49 from brenkem/fix-string-conversion
Browse files Browse the repository at this point in the history
fix: use strconv.ParseInt instead of strconv.Atoi
  • Loading branch information
kha7iq authored Jun 21, 2021
2 parents 7186e5d + 76105ec commit 24242b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ All configuration options are also available via environment variables.`,
if len(v) <= 0 {
return helpers.ErrChannel
}
k, errStr := strconv.Atoi(v)
k, errStr := strconv.ParseInt(v, 10, 64)
if errStr != nil {
return errStr
}
telegramSvc.AddReceivers(int64(k))
telegramSvc.AddReceivers(k)
}

notifier.UseServices(telegramSvc)
Expand Down

0 comments on commit 24242b5

Please sign in to comment.