mirror of
https://github.com/arnaucube/argos.git
synced 2026-02-07 19:16:40 +01:00
reorganization and a little bit of code robustness, and implemented TweetRandom functionallity
This commit is contained in:
17
analyzeUserInteractions.go
Normal file
17
analyzeUserInteractions.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/dghubble/go-twitter/twitter"
|
||||
)
|
||||
|
||||
func analyzeUserInteractions(tweets []twitter.Tweet, words map[string]int) map[string]int {
|
||||
var userInteractions = make(map[string]int)
|
||||
for v, k := range words {
|
||||
if strings.Contains(v, "@") {
|
||||
userInteractions[v] = k
|
||||
}
|
||||
}
|
||||
return (userInteractions)
|
||||
}
|
||||
Reference in New Issue
Block a user