mirror of https://github.com/go-redis/redis.git
feat: add NewXPendingResult for unit testing XPending (#2066)
This commit is contained in:
parent
2baad407e2
commit
b7fd09e594
|
@ -178,3 +178,11 @@ func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd {
|
||||||
cmd.SetErr(err)
|
cmd.SetErr(err)
|
||||||
return &cmd
|
return &cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewXPendingResult returns a XPendingCmd initialised with val and err for testing.
|
||||||
|
func NewXPendingResult(val *XPending, err error) *XPendingCmd {
|
||||||
|
var cmd XPendingCmd
|
||||||
|
cmd.val = val
|
||||||
|
cmd.SetErr(err)
|
||||||
|
return &cmd
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue