Skip to content

Commit

Permalink
Updated deps after several years :) (#50)
Browse files Browse the repository at this point in the history
* Updated deps after several years :)

* Migrated to official rabbit driver

* Updated go version to 1.16
  • Loading branch information
cheshir authored Oct 2, 2022
1 parent b2afc9b commit 738decb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x]
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
runs-on: ubuntu-latest
services:
rabbitmq:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ go-mq supports both sync and async producers.
go-mq has auto reconnects on closed connection or network error.
You can configure delay between each connect try using `reconnect_delay` option.

### Minimal go version

1.16

## Install

`go get -u github.com/cheshir/go-mq`
Expand Down
5 changes: 3 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"time"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// DeliveryMode describes an AMQP message delivery mode.
Expand Down Expand Up @@ -82,6 +82,7 @@ type QueueConfig struct {

func (config QueueConfig) normalize() {
config.BindingOptions.normalizeKeys()
//config.BindingOptions.buildArgs()
config.Options.normalizeKeys()
config.Options.buildArgs()
}
Expand Down Expand Up @@ -183,7 +184,7 @@ func (options Options) convertArgsToAMQPTable(args interface{}) amqp.Table {

switch arguments := args.(type) {
case map[string]interface{}:
table = amqp.Table(arguments)
table = arguments
case map[interface{}]interface{}:
table = make(amqp.Table, len(arguments))

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/cheshir/go-mq

go 1.14
go 1.16

require (
github.com/NeowayLabs/wabbit v0.0.0-20200409220312-12e68ab5b0c6
github.com/google/uuid v1.1.1 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71
github.com/NeowayLabs/wabbit v0.0.0-20210927194032-73ad61d1620e
github.com/google/uuid v1.3.0 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/rabbitmq/amqp091-go v1.5.0
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
)
2 changes: 1 addition & 1 deletion mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/NeowayLabs/wabbit/amqp"
"github.com/NeowayLabs/wabbit/amqptest"
"github.com/NeowayLabs/wabbit/utils"
amqpDriver "github.com/streadway/amqp"
amqpDriver "github.com/rabbitmq/amqp091-go"
)

const (
Expand Down

0 comments on commit 738decb

Please sign in to comment.