From 098f729a958bf1e77415b8c5af8df355e5b36c1a Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 4 May 2019 11:56:03 +0800 Subject: [PATCH] testtest --- main.go | 1 - mq.go | 3 ++- td.go | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 1be5be4..3238deb 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,6 @@ import ( "flag" "fmt" "log" - "time" "gopkg.in/gcfg.v1" diff --git a/mq.go b/mq.go index a762be5..ae76b7d 100644 --- a/mq.go +++ b/mq.go @@ -3,11 +3,12 @@ package main import ( "encoding/json" "log" + "strconv" "github.com/streadway/amqp" ) -func MQSendMsgWorker(id int, msgs chan<- ChatWarsMessage) { +func MQSendMsgWorker(id int, msgs <-chan ChatWarsMessage) { var x ChatWarsMessage conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Queue) failOnError(err, "MQSendMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ") diff --git a/td.go b/td.go index 33a2d5d..584bdf1 100644 --- a/td.go +++ b/td.go @@ -1,14 +1,12 @@ package main import ( - "encoding/json" "fmt" "log" "math" "time" "github.com/Arman92/go-tdlib" - "github.com/streadway/amqp" ) func ListenCW(c *tdlib.Client) {