mirror of https://github.com/go-redis/redis.git
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)
|
||||
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