conn := redis.Dial("tcp", "localhost:6379") defer conn.Close() _, err := conn.Do("SET", "key", "value") if err != nil { log.Fatalf("failed to set key: %v", err) }
conn := redis.Dial("tcp", "localhost:6379") defer conn.Close() value, err := redis.String(conn.Do("GET", "key")) if err != nil { log.Fatalf("failed to get value for key: %v", err) }Package library: github.com/garyburd.redigo.redis.