1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Update all dependencies to latest

This commit is contained in:
Daniel Heath
2018-01-22 21:07:50 +11:00
parent ff420fb81d
commit b4638476cc
327 changed files with 43002 additions and 30657 deletions

View File

@@ -14,11 +14,13 @@
package redis
import "errors"
import (
"errors"
"time"
)
// Subscription represents a subscribe or unsubscribe notification.
type Subscription struct {
// Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe"
Kind string
@@ -31,7 +33,6 @@ type Subscription struct {
// Message represents a message notification.
type Message struct {
// The originating channel.
Channel string
@@ -41,7 +42,6 @@ type Message struct {
// PMessage represents a pmessage notification.
type PMessage struct {
// The matched pattern.
Pattern string
@@ -106,7 +106,17 @@ func (c PubSubConn) Ping(data string) error {
// or error. The return value is intended to be used directly in a type switch
// as illustrated in the PubSubConn example.
func (c PubSubConn) Receive() interface{} {
reply, err := Values(c.Conn.Receive())
return c.receiveInternal(c.Conn.Receive())
}
// ReceiveWithTimeout is like Receive, but it allows the application to
// override the connection's default timeout.
func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} {
return c.receiveInternal(ReceiveWithTimeout(c.Conn, timeout))
}
func (c PubSubConn) receiveInternal(replyArg interface{}, errArg error) interface{} {
reply, err := Values(replyArg, errArg)
if err != nil {
return err
}