@@ -38,12 +38,12 @@ func NewWorker(opts ...Option) *Worker {
3838
3939 w .conn , err = amqp .Dial (w .opts .addr )
4040 if err != nil {
41- w .opts .logger .Fatal ("can't connect rabbitmq:" , err )
41+ w .opts .logger .Fatal ("can't connect rabbitmq: " , err )
4242 }
4343
4444 w .channel , err = w .conn .Channel ()
4545 if err != nil {
46- w .opts .logger .Fatal ("can't setup channel:" , err )
46+ w .opts .logger .Fatal ("can't setup channel: " , err )
4747 }
4848
4949 if err := w .channel .ExchangeDeclare (
@@ -55,7 +55,7 @@ func NewWorker(opts ...Option) *Worker {
5555 false , // noWait
5656 nil , // arguments
5757 ); err != nil {
58- w .opts .logger .Fatal ("can't declares an exchange:" , err )
58+ w .opts .logger .Fatal ("can't declares an exchange: " , err )
5959 }
6060
6161 return w
@@ -77,7 +77,7 @@ func (w *Worker) startConsumer() (err error) {
7777 }
7878
7979 if err := w .channel .QueueBind (q .Name , w .opts .routingKey , w .opts .exchangeName , false , nil ); err != nil {
80- w .opts .logger .Error ("cannot consume without a binding to exchange:" , err )
80+ w .opts .logger .Error ("cannot consume without a binding to exchange: " , err )
8181 return
8282 }
8383
@@ -92,7 +92,7 @@ func (w *Worker) startConsumer() (err error) {
9292 )
9393
9494 if err != nil {
95- w .opts .logger .Error ("cannot consume from:" , q .Name , err )
95+ w .opts .logger .Error ("cannot consume from: " , q .Name , err )
9696 }
9797 })
9898
@@ -166,10 +166,10 @@ func (w *Worker) Shutdown() (err error) {
166166 w .stopOnce .Do (func () {
167167 close (w .stop )
168168 if err = w .channel .Cancel (w .opts .tag , true ); err != nil {
169- w .opts .logger .Error ("consumer cancel failed:" , err )
169+ w .opts .logger .Error ("consumer cancel failed: " , err )
170170 }
171171 if err = w .conn .Close (); err != nil {
172- w .opts .logger .Error ("AMQP connection close error:" , err )
172+ w .opts .logger .Error ("AMQP connection close error: " , err )
173173 }
174174 })
175175
0 commit comments