From 583e9012218a09ab2ad58ee6e4023ee15c7eb4d0 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Mon, 20 Aug 2012 00:16:26 +0300 Subject: [PATCH] Use IfaceSliceReq for CONFIG GET because it can return (nil) on Redis 2.4.*. --- commands.go | 4 ++-- redis_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 4f0aea8..ebb4239 100644 --- a/commands.go +++ b/commands.go @@ -950,8 +950,8 @@ func (c *Client) ClientList() *StringReq { return req } -func (c *Client) ConfigGet(parameter string) *StringSliceReq { - req := NewStringSliceReq("CONFIG", "GET", parameter) +func (c *Client) ConfigGet(parameter string) *IfaceSliceReq { + req := NewIfaceSliceReq("CONFIG", "GET", parameter) c.Process(req) return req } diff --git a/redis_test.go b/redis_test.go index f277fb0..e089422 100644 --- a/redis_test.go +++ b/redis_test.go @@ -2544,7 +2544,7 @@ func (t *RedisTest) TestCmdConfigSet(c *C) { c.Assert(configGet.Val(), HasLen, 2) c.Assert(configGet.Val()[0], Equals, "maxmemory") - configSet := t.client.ConfigSet("maxmemory", configGet.Val()[1]) + configSet := t.client.ConfigSet("maxmemory", configGet.Val()[1].(string)) c.Assert(configSet.Err(), IsNil) c.Assert(configSet.Val(), Equals, "OK") }