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