From 08dad1eb7f5b76907b96cee42e300138866020bb Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sun, 12 Jan 2020 12:14:22 +0200 Subject: [PATCH] Add hint on Streams usage --- commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands.go b/commands.go index 258bad0e..e0430ebc 100644 --- a/commands.go +++ b/commands.go @@ -1405,7 +1405,7 @@ func (c cmdable) XRevRangeN(stream, start, stop string, count int64) *XMessageSl } type XReadArgs struct { - Streams []string + Streams []string // list of streams and ids, e.g. stream1 stream2 id1 id2 Count int64 Block time.Duration } @@ -1421,6 +1421,7 @@ func (c cmdable) XRead(a *XReadArgs) *XStreamSliceCmd { args = append(args, "block") args = append(args, int64(a.Block/time.Millisecond)) } + args = append(args, "streams") for _, s := range a.Streams { args = append(args, s)