mirror of
https://github.com/redis/go-redis.git
synced 2025-04-19 07:22:17 +03:00
Add NewZWithKeyCmdResult to initialize ZWithKeyCmd for testing
This commit is contained in:
parent
69cf7e5f6f
commit
03eeba66c1
@ -106,6 +106,14 @@ func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd {
|
|||||||
return &cmd
|
return &cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewZWithKeyCmdResult returns a NewZWithKeyCmd initialised with val and err for testing
|
||||||
|
func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd {
|
||||||
|
var cmd ZWithKeyCmd
|
||||||
|
cmd.val = val
|
||||||
|
cmd.setErr(err)
|
||||||
|
return &cmd
|
||||||
|
}
|
||||||
|
|
||||||
// NewScanCmdResult returns a ScanCmd initialised with val and err for testing
|
// NewScanCmdResult returns a ScanCmd initialised with val and err for testing
|
||||||
func NewScanCmdResult(keys []string, cursor uint64, err error) *ScanCmd {
|
func NewScanCmdResult(keys []string, cursor uint64, err error) *ScanCmd {
|
||||||
var cmd ScanCmd
|
var cmd ScanCmd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user