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) {
563563 c .sharding .SetAddrs (addrs )
564564}
565565
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-
573566func (c * Ring ) Process (ctx context.Context , cmd Cmder ) error {
574567 err := c .processHook (ctx , cmd )
575568 cmd .SetErr (err )
Original file line number Diff line number Diff line change @@ -74,6 +74,13 @@ var _ = Describe("Redis Ring", func() {
7474 Expect (ring .Close ()).NotTo (HaveOccurred ())
7575 })
7676
77+ It ("do" , func () {
78+ ctx := context .Background ()
79+
80+ err := ring .Do (ctx , "ping" ).Err ()
81+ Expect (err ).NotTo (HaveOccurred ())
82+ })
83+
7784 It ("supports context" , func () {
7885 ctx , cancel := context .WithCancel (ctx )
7986 cancel ()
You can’t perform that action at this time.
0 commit comments