diff --git a/initalize/rabbitmq.go b/initalize/rabbitmq.go index 58a26645..f8b63e40 100644 --- a/initalize/rabbitmq.go +++ b/initalize/rabbitmq.go @@ -9,6 +9,7 @@ import ( "github.com/streadway/amqp" "github.com/zeromicro/go-zero/core/logx" "log" + "strings" "sync" ) @@ -25,6 +26,7 @@ type queueItem struct { var mapMq = make(map[constants.RABBIT_MQ]queueItem) func InitRabbitMq(url string, config *tls.Config) *RabbitMqHandle { + url = strings.Trim(url, " ") if url == "" { return nil }