Skip to content

Commit 68098a7

Browse files
committed
Merge branch 'master' of github.com:go-redis/redis
2 parents b5d6b29 + b7fd09e commit 68098a7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

result.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,11 @@ func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd {
178178
cmd.SetErr(err)
179179
return &cmd
180180
}
181+
182+
// NewXPendingResult returns a XPendingCmd initialised with val and err for testing.
183+
func NewXPendingResult(val *XPending, err error) *XPendingCmd {
184+
var cmd XPendingCmd
185+
cmd.val = val
186+
cmd.SetErr(err)
187+
return &cmd
188+
}

0 commit comments

Comments
 (0)