You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No. You will need to call WriteArray, which writes the number of items in the array first.
If you don't know how many items there will be then you can buffer them like:
// buffer and count the itemsvarcountintvarbuf bufio.Bufferw:=redcon.NewWriter(&buf)
forit.Seek(); it.Valid(); it.Next() {
w.WriteBulk(it.Key.Data())
count++
}
// write the array header and the buffered items.conn.WriteArray(count)
conn.WriteRaw(buf.Bytes())
if i'm getting data from db,
is this possible without pre specifying with WriteArray() first?
for it.Seek(); it.Valid(); it.Next() {
conn.WriteBulk([]byte, it.Key.Data())
}
The text was updated successfully, but these errors were encountered: