forked from mirror/redis
add NewXStreamSliceCmdResult to initialise XStreamSliceCmd for testing
This commit is contained in:
parent
74177b12f8
commit
fb31d51fc3
|
@ -154,3 +154,11 @@ func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd {
|
||||||
cmd.setErr(err)
|
cmd.setErr(err)
|
||||||
return &cmd
|
return &cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewXStreamSliceCmdResult returns a XStreamSliceCmd initialised with val and err for testing
|
||||||
|
func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd {
|
||||||
|
var cmd XStreamSliceCmd
|
||||||
|
cmd.val = val
|
||||||
|
cmd.setErr(err)
|
||||||
|
return &cmd
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue