(cmd string, args ...interface{})
| 52 | } |
| 53 | |
| 54 | func (c *Client) Do(cmd string, args ...interface{}) (interface{}, error) { |
| 55 | r, err := c.conn.Do(cmd, args...) |
| 56 | if err != nil { |
| 57 | c.Close() |
| 58 | return nil, errors.Trace(err) |
| 59 | } |
| 60 | c.LastUse = time.Now() |
| 61 | |
| 62 | if err, ok := r.(redigo.Error); ok { |
| 63 | return nil, errors.Trace(err) |
| 64 | } |
| 65 | return r, nil |
| 66 | } |
| 67 | |
| 68 | func (c *Client) Send(cmd string, args ...interface{}) error { |
| 69 | if err := c.conn.Send(cmd, args...); err != nil { |
no test coverage detected