mirror of
https://github.com/arnaucube/argos.git
synced 2026-02-08 11:36:40 +01:00
exit script if connection to api is failed
This commit is contained in:
@@ -89,11 +89,12 @@ func analyzeHours(tweets []twitter.Tweet) {
|
||||
for _, v := range tweets {
|
||||
time := strings.Split(v.CreatedAt, " ")[3]
|
||||
hour := strings.Split(time, ":")[0]
|
||||
if _, ok := hours[hour]; ok {
|
||||
/*if _, ok := hours[hour]; ok {
|
||||
hours[hour] = hours[hour] + 1
|
||||
} else {
|
||||
hours[hour] = 1
|
||||
}
|
||||
}*/
|
||||
hours[hour]++
|
||||
}
|
||||
printHours(hours)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user