From 689d1295b5ee56063f2ef8764a26458905060ee5 Mon Sep 17 00:00:00 2001 From: Leon Oldfritter Date: Wed, 15 Jul 2020 16:57:50 +0800 Subject: [PATCH] update sneaker-go to v2.0.8 --- go.mod | 2 +- go.sum | 6 ++++-- initializers/rabbitmq.go | 8 ++++---- workers/workers.go | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 002fde1..31213ae 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/microcosm-cc/bluemonday v1.0.2 // indirect github.com/newrelic/go-agent v3.4.0+incompatible // indirect github.com/oldfritter/matching v0.0.0-20190827024937-efdf83ea2ab0 - github.com/oldfritter/sneaker-go v1.0.6 + github.com/oldfritter/sneaker-go/v2 v2.0.8 github.com/qiniu/api.v7/v7 v7.5.0 github.com/qor/admin v0.0.0-20200315024928-877b98a68a6f // indirect github.com/qor/assetfs v0.0.0-20170713023933-ff57fdc13a14 // indirect diff --git a/go.sum b/go.sum index 685ae64..a02a3e0 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,10 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le github.com/newrelic/go-agent v3.4.0+incompatible h1:GhUhNLDdR3ETfUVJAN/czXlqRTcgbPs6U02jYhf15rg= github.com/newrelic/go-agent v3.4.0+incompatible/go.mod h1:a8Fv1b/fYhFSReoTU6HDkTYIMZeSVNffmoS726Y0LzQ= github.com/oldfritter/matching v0.0.0-20190827024937-efdf83ea2ab0/go.mod h1:qtjPJJjsQnSacfr0tDIkqP91I69DFJKwY/0EBlwVumA= -github.com/oldfritter/sneaker-go v1.0.6 h1:cz8PgNZ9cJ6OouFTIvRDdXFvC0v92NL7FXwY3ZepD/c= -github.com/oldfritter/sneaker-go v1.0.6/go.mod h1:q9+KC43OfLklfiKffi11et1HpMufAyD5q3mI/cdpOHw= +github.com/oldfritter/sneaker-go v1.1.0 h1:J5bXkAx73eVylAgqM+4x8oNdoHKmAHK9IRmTyNJtRnU= +github.com/oldfritter/sneaker-go/v2 v2.0.8 h1:GAQ1QyI/XDg3SK6hfhRoY684zsVzVGldgc4gPFah2fk= +github.com/oldfritter/sneaker-go/v2 v2.0.8/go.mod h1:bryvrz4puhkiLZVVZFVC/VcPmZbPHC5mq9o7UKTJoj4= +github.com/oldfritter/sneaker-go/v2 v2.1.1 h1:o130Ma1FUUpqgc9ti/Ks2wea1w5oB1iXpAFgWBNu96A= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/qiniu/api.v7/v7 v7.5.0 h1:DY6NrIp6FZ1GP4Roc9hRnO2m+OLzASYNnvz5Mbgw1rk= diff --git a/initializers/rabbitmq.go b/initializers/rabbitmq.go index ee52fd0..0debb65 100644 --- a/initializers/rabbitmq.go +++ b/initializers/rabbitmq.go @@ -7,7 +7,7 @@ import ( "path/filepath" "time" - "github.com/oldfritter/sneaker-go/utils" + "github.com/oldfritter/sneaker-go/v2" "github.com/streadway/amqp" "gopkg.in/yaml.v2" @@ -29,7 +29,7 @@ type Amqp struct { var ( AmqpGlobalConfig Amqp - RabbitMqConnect utils.RabbitMqConnect + RabbitMqConnect sneaker.RabbitMqConnect ) func InitializeAmqpConfig() { @@ -51,7 +51,7 @@ func InitializeAmqpConfig() { func InitializeAmqpConnection() { var err error conn, err := amqp.Dial("amqp://" + AmqpGlobalConfig.Connect.Username + ":" + AmqpGlobalConfig.Connect.Password + "@" + AmqpGlobalConfig.Connect.Host + ":" + AmqpGlobalConfig.Connect.Port + "/" + AmqpGlobalConfig.Connect.Vhost) - RabbitMqConnect = utils.RabbitMqConnect{conn} + RabbitMqConnect = sneaker.RabbitMqConnect{conn} if err != nil { time.Sleep(5000) InitializeAmqpConnection() @@ -67,7 +67,7 @@ func CloseAmqpConnection() { RabbitMqConnect.Close() } -func GetRabbitMqConnect() utils.RabbitMqConnect { +func GetRabbitMqConnect() sneaker.RabbitMqConnect { return RabbitMqConnect } diff --git a/workers/workers.go b/workers/workers.go index 970bd76..ddcc843 100644 --- a/workers/workers.go +++ b/workers/workers.go @@ -7,7 +7,7 @@ import ( "os/signal" "strconv" - sneaker "github.com/oldfritter/sneaker-go" + sneaker "github.com/oldfritter/sneaker-go/v2" "github.com/streadway/amqp" envConfig "github.com/oldfritter/goDCE/config"