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

Info command doesn't work #27

Closed andyone closed 10 years ago

andyone commented 10 years ago

Simple test:

package main

import (
    "fmt"
    "menteslibres.net/gosexy/redis"
)

func main() {
    client := redis.New()

    client.Connect("localhost", 6379)
    info, err := client.Info("all")

    fmt.Println(err)
    fmt.Println(info)

    client.Quit()
}

Output:

Unsupported conversion: redis string to slice
[]
therealbill commented 10 years ago

The problem appears to be not handling this conversion in setReplyValue in main.go

xiam commented 10 years ago

The return value we were getting from INFO was wrong, we assumed a redis list, but it's actually a large string. Return type was fixed, also the missing test for redis.Info() was added.