1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Refactor NewXInfoGroupsCmd

This commit is contained in:
Vladimir Mihailenco
2020-09-23 11:00:34 +03:00
parent a32502b1d9
commit 86326c4924
3 changed files with 59 additions and 46 deletions

View File

@ -1517,7 +1517,7 @@ func (c cmdable) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd {
keyPos += 2
}
args = append(args, "streams")
keyPos += 1
keyPos++
for _, s := range a.Streams {
args = append(args, s)
}
@ -1592,10 +1592,10 @@ func (c cmdable) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSlic
}
if a.NoAck {
args = append(args, "noack")
keyPos += 1
keyPos++
}
args = append(args, "streams")
keyPos += 1
keyPos++
for _, s := range a.Streams {
args = append(args, s)
}