From d53b86e8f3ec0f60ed0cbff3f1da8074d657cc69 Mon Sep 17 00:00:00 2001 From: Vetcher Date: Mon, 22 Oct 2018 22:17:09 +0300 Subject: [PATCH] init new when map is empty or nil; add go.mod --- conn/dialers.go | 3 +++ go.mod | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 go.mod diff --git a/conn/dialers.go b/conn/dialers.go index c9250f3..3abf82e 100644 --- a/conn/dialers.go +++ b/conn/dialers.go @@ -49,6 +49,9 @@ const ( ) func setupDefaultConfigProperties(prop amqp.Table) amqp.Table { + if len(prop) == 0 { + prop = amqp.Table{} + } if _, ok := prop["product"]; !ok { prop["product"] = defaultProduct } diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..989e02b --- /dev/null +++ b/go.mod @@ -0,0 +1,27 @@ +module github.com/devimteam/amqp + +require ( + github.com/Shopify/sarama v1.19.0 // indirect + github.com/Shopify/toxiproxy v2.1.3+incompatible // indirect + github.com/apache/thrift v0.0.0-20181019115558-cd829a0b9a5c // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/eapache/go-resiliency v1.1.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/go-logfmt/logfmt v0.3.0 // indirect + github.com/gogo/protobuf v1.1.1 + github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect + github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 // indirect + github.com/kr/pretty v0.1.0 // indirect + github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect + github.com/opentracing/opentracing-go v1.0.2 + github.com/openzipkin/zipkin-go-opentracing v0.3.4 + github.com/pierrec/lz4 v2.0.5+incompatible // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect + github.com/satori/go.uuid v1.2.0 + github.com/streadway/amqp v0.0.0-20180806233856-70e15c650864 + github.com/stretchr/testify v1.2.2 // indirect + golang.org/x/net v0.0.0-20181017193950-04a2e542c03f // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect +)