gosexy / redis

Redis client for Go that maps the full redis command list into equivalent Go functions.
MIT License
167 stars 44 forks source link

Bug: ConfigGet should return ([]string, error) instead of (string, error) #39

Closed tgkavanagh closed 9 years ago

tgkavanagh commented 9 years ago

In trying to use ConfigGet("maxmemory") I received the error: "resp: Unsupported conversion: array to string"

After making the following modifications to the commands.go file and it worked as expected:

func (c  *Client) ConfigGet(parameter string) ([]string, error) {
    var ret []string`
    err := c.command(
                &ret,
                []byte("CONFIG"),
                []byte("GET"),
                []byte(parameter),
        )
        return ret, err
}
tgkavanagh commented 9 years ago

Closing this issue as a pull request has been generated with the fix.