chirpnest/mq.go
2019-06-28 16:14:10 +08:00

12 lines
217 B
Go

package main
import (
"github.com/streadway/amqp"
)
func (c *MQClient) Open() error {
conn, err := amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
c.Connection = conn
return err
}