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) {