Let's say you want to get a string response from Redis. Using the redigo library you can send a command and receive the response back using it's helper methods.
This is a snippet of how you can do that:
import "github.com/garyburd/redigo/redis"
someCap := 10 // Make the slice however large you need it.
myarray := make([]string, someCap)
redisConn, err := redis.Dial("tcp" "your_redis_host:port")
if err != nil {
// Handle your error accordingly.
}
defer redisConn.Close()
resp, err := redis.String(redisConn.Do("GET", "some_key"))
if err != nil {
// Handle your error accordingly.
}
myarray = append(myarray, resp)