Created
July 5, 2013 15:33
-
-
Save xiaojay/5935331 to your computer and use it in GitHub Desktop.
go for redis
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
package main | |
import( | |
"fmt" | |
"github.com/vmihailenco/redis" | |
) | |
func main(){ | |
password := "" | |
db := int64(-1) | |
client := redis.NewTCPClient("localhost:6379", password, db) | |
defer client.Close() | |
set := client.Set("foo", "bar") | |
fmt.Println(set.Err(), set.Val()) | |
get := client.Get("foo") | |
fmt.Println(get.Err(), get.Val()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment