Skip to content

Instantly share code, notes, and snippets.

@rochacon
Created January 9, 2015 23:48
Show Gist options
  • Save rochacon/4dc5fc1efe0d8de2c2b1 to your computer and use it in GitHub Desktop.
Save rochacon/4dc5fc1efe0d8de2c2b1 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/go-redis/redis"
)
func main() {
cli := redis.NewTCPClient(&redis.Options{
Addr: "127.0.0.1:6379",
})
cmd := cli.ZUnionStore("test", redis.ZStore{}, "key1", "key2")
if err := cmd.Err(); err != nil {
panic(err)
}
fmt.Println("Definition", cmd.String())
fmt.Println("Values", cmd.Val())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment