Skip to content

Instantly share code, notes, and snippets.

@blackdev1l
Created December 15, 2015 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackdev1l/a8cbd48cff44ccdaa1ef to your computer and use it in GitHub Desktop.
Save blackdev1l/a8cbd48cff44ccdaa1ef to your computer and use it in GitHub Desktop.
func store(text string, c redis.Conn) {
text = strings.ToLower(text)
splitted := strings.Split(text, " ")
fmt.Println(len(splitted))
for k, v := range splitted {
if k < len(splitted) {
fmt.Printf("%s -> %s\n", splitted[k], splitted[k+1])
c.Do("SADD", v, splitted[k+1])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment