From 5af57e5ca6f42a2170ee7331a6652902a59922e0 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Fri, 27 Jul 2012 14:53:23 +0300 Subject: [PATCH] Add custom command example. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index cfa2938f..b45a2e8f 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,19 @@ Thread safety ------------- Client is thread safe. Internally sync.Mutex is used to synchronize writes and reads. + +Custom commands +--------------- + +Example: + + func Get(client *redis.Client, key string) *redis.BulkReq { + req := redis.NewBulkReq("GET", key) + client.Run(req) + return req + } + + value, err := Get(redisClient).Reply() + if err != nil { + panic(err) + }