From e309eaf915a7ca9aea199c156a30b501ff9cb8e9 Mon Sep 17 00:00:00 2001 From: Monkey Date: Fri, 24 Feb 2023 20:21:12 +0800 Subject: [PATCH] docs: add reading lag field comment (#2451) Signed-off-by: monkey92t Co-authored-by: Vladimir Mihailenco --- command.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command.go b/command.go index 6536f33c..da1c01c0 100644 --- a/command.go +++ b/command.go @@ -2057,6 +2057,9 @@ func (cmd *XInfoGroupsCmd) readReply(rd *proto.Reader) error { } case "lag": group.Lag, err = rd.ReadInt() + + // lag: the number of entries in the stream that are still waiting to be delivered + // to the group's consumers, or a NULL(Nil) when that number can't be determined. if err != nil && err != Nil { return err } @@ -2366,6 +2369,8 @@ func readStreamGroups(rd *proto.Reader) ([]XInfoStreamGroup, error) { return nil, err } case "lag": + // lag: the number of entries in the stream that are still waiting to be delivered + // to the group's consumers, or a NULL(Nil) when that number can't be determined. group.Lag, err = rd.ReadInt() if err != nil && err != Nil { return nil, err