File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -563,13 +563,6 @@ func (c *Ring) SetAddrs(addrs map[string]string) {
563
563
c .sharding .SetAddrs (addrs )
564
564
}
565
565
566
- // Do create a Cmd from the args and processes the cmd.
567
- func (c * Ring ) Do (ctx context.Context , args ... interface {}) * Cmd {
568
- cmd := NewCmd (ctx , args ... )
569
- _ = c .Process (ctx , cmd )
570
- return cmd
571
- }
572
-
573
566
func (c * Ring ) Process (ctx context.Context , cmd Cmder ) error {
574
567
err := c .processHook (ctx , cmd )
575
568
cmd .SetErr (err )
Original file line number Diff line number Diff line change @@ -74,6 +74,13 @@ var _ = Describe("Redis Ring", func() {
74
74
Expect (ring .Close ()).NotTo (HaveOccurred ())
75
75
})
76
76
77
+ It ("do" , func () {
78
+ ctx := context .Background ()
79
+
80
+ err := ring .Do (ctx , "ping" ).Err ()
81
+ Expect (err ).NotTo (HaveOccurred ())
82
+ })
83
+
77
84
It ("supports context" , func () {
78
85
ctx , cancel := context .WithCancel (ctx )
79
86
cancel ()
You can’t perform that action at this time.
0 commit comments