From da7c54863968f9c4ec1d84b179300565d78a0229 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 28 Jun 2019 12:57:40 +0800 Subject: [PATCH] testtest --- def.go | 2 +- mq.go | 4 ++-- workers.go | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/def.go b/def.go index 498a0d5..162ee92 100644 --- a/def.go +++ b/def.go @@ -29,7 +29,7 @@ type MQSession struct { MQConnection *amqp.Connection MQChannel *amqp.Channel MQQueue *amqp.Queue - MQDelivery <-chan *ampq.Delivery + MQDelivery <-chan *amqp.Delivery isConnected bool } diff --git a/mq.go b/mq.go index c4247f2..6ab4ae2 100644 --- a/mq.go +++ b/mq.go @@ -8,13 +8,13 @@ import ( func (s MQSession) Open() error { if s.isConnected { - return error.Error("Session is already connected.") + return errors.New("Session is already connected.") } if SLL == false { s.MQConnection, err = amqp.Dial("amqp://" + Session.User + ":" + Session.Password + "@" + Session.Host + "/" + Session.Path) } else { - return error.Error("SSL connection not implemented") + return errors.New("SSL connection not implemented") } logOnError(err, "Open : Failed to connect to RabbitMQ") if err != nil { diff --git a/workers.go b/workers.go index 5388f7d..82a53ff 100644 --- a/workers.go +++ b/workers.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/streadway/amqp" tb "gopkg.in/tucnak/telebot.v2" )