Created
December 15, 2015 21:34
-
-
Save blackdev1l/a8cbd48cff44ccdaa1ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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