From 8756eda4d32d2897ac1e6450251e83aefbc727ce Mon Sep 17 00:00:00 2001 From: Hristo Temelski Date: Tue, 29 Jul 2025 11:00:32 +0300 Subject: [PATCH] fixed command return type --- stream_commands.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stream_commands.go b/stream_commands.go index a14821e9..dab6f462 100644 --- a/stream_commands.go +++ b/stream_commands.go @@ -8,9 +8,9 @@ import ( type StreamCmdable interface { XAdd(ctx context.Context, a *XAddArgs) *StringCmd - XAckDel(ctx context.Context, stream string, group string, mode string, ids ...string) *IntCmd + XAckDel(ctx context.Context, stream string, group string, mode string, ids ...string) *SliceCmd XDel(ctx context.Context, stream string, ids ...string) *IntCmd - XDelEx(ctx context.Context, stream string, mode string, ids ...string) *IntCmd + XDelEx(ctx context.Context, stream string, mode string, ids ...string) *SliceCmd XLen(ctx context.Context, stream string) *IntCmd XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd @@ -106,12 +106,12 @@ func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd { return cmd } -func (c cmdable) XAckDel(ctx context.Context, stream string, group string, mode string, ids ...string) *IntCmd { +func (c cmdable) XAckDel(ctx context.Context, stream string, group string, mode string, ids ...string) *SliceCmd { args := []interface{}{"xackdel", stream, group, mode, "ids", strconv.Itoa(len(ids))} for _, id := range ids { args = append(args, id) } - cmd := NewIntCmd(ctx, args...) + cmd := NewSliceCmd(ctx, args...) _ = c(ctx, cmd) return cmd } @@ -126,12 +126,12 @@ func (c cmdable) XDel(ctx context.Context, stream string, ids ...string) *IntCmd return cmd } -func (c cmdable) XDelEx(ctx context.Context, stream string, mode string, ids ...string) *IntCmd { +func (c cmdable) XDelEx(ctx context.Context, stream string, mode string, ids ...string) *SliceCmd { args := []interface{}{"xdelex", stream, mode, "ids", strconv.Itoa(len(ids))} for _, id := range ids { args = append(args, id) } - cmd := NewIntCmd(ctx, args...) + cmd := NewSliceCmd(ctx, args...) _ = c(ctx, cmd) return cmd }