Skip to content

Commit 01a0bcf

Browse files
author
Michael Hoisie
committed
Added key to Get error message
1 parent c36ecb9 commit 01a0bcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redis.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ End:
195195

196196
func (client *Client) Get(name string) ([]byte, os.Error) {
197197
cmd := fmt.Sprintf("GET %s\r\n", name)
198-
res, err := client.sendCommand(cmd)
198+
res, _ := client.sendCommand(cmd)
199199

200-
if err != nil {
201-
return nil, err
200+
if res == nil {
201+
return nil, RedisError("Key `"+name+"` does not exist")
202202
}
203203

204204
data := res.([]byte)

0 commit comments

Comments
 (0)