mirror of
https://github.com/redis/go-redis.git
synced 2025-04-16 09:23:06 +03:00
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…
x
Reference in New Issue
Block a user