Skip to content

Commit

Permalink
Merge pull request #7 from goqihoo/patch-1
Browse files Browse the repository at this point in the history
Fix bug: can not parse certain error bug
  • Loading branch information
astaxie committed Aug 24, 2016
2 parents 8652e61 + 4b1b5c5 commit 1f1c6e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redis.go
Expand Up @@ -113,8 +113,8 @@ func readResponse(reader *bufio.Reader) (interface{}, error) {
return strings.TrimSpace(line[1:]), nil
}

if strings.HasPrefix(line, "-ERR ") {
errmesg := strings.TrimSpace(line[5:])
if line[0] == '-' {
errmesg := strings.TrimSpace(line[1:])
return nil, RedisError(errmesg)
}

Expand Down

0 comments on commit 1f1c6e6

Please sign in to comment.