mirror of
https://github.com/redis/go-redis.git
synced 2025-10-29 05:29:22 +03:00
Merge pull request #1153 from jcox250/master
Add NewXMessagesSliceCmdResult & NewXStreamSliceCmdResult for testing
This commit is contained in:
16
result.go
16
result.go
@@ -146,3 +146,19 @@ 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
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user