Closed gitmko0 closed 4 years ago
According to the Redis website, the hmget command returns an array of bulk strings.
So you would first use AppendArray followed by a number of AppendBulkString (or AppendBulk for byte slices).
Here's an example of how to create a valid Redis response for the HMGET command from an array of Go strings.
strs := []string{ "hello", "world", "planet" }
var resp []byte
resp = redcon.AppendArray(resp, len(strs))
for _, str := range strs {
resp = redcon.AppendBulkString(resp, str)
}
how does hmget return values? sorry i'm not sure how to use appendbulk etc without examples.