reorganization and a little bit of code robustness, and implemented TweetRandom functionallity

This commit is contained in:
arnaucode
2017-04-20 23:08:09 +02:00
parent 0002787cb0
commit 2e1d99c387
13 changed files with 149 additions and 35 deletions

View 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)
}