diff --git a/easylock/lock_segment.go b/easylock/lock_segment.go index 724d376..196831b 100644 --- a/easylock/lock_segment.go +++ b/easylock/lock_segment.go @@ -7,7 +7,7 @@ // Date : 2021-02-24 10:44 下午 package easylock -import "github.com/go-developer/gopkg/util" +import "git.zhangdeman.cn/zhangdeman/gopkg/util" // NewSegment 获取分段锁 // diff --git a/easymap/normal.go b/easymap/normal.go index 60f438d..83efac0 100644 --- a/easymap/normal.go +++ b/easymap/normal.go @@ -10,7 +10,7 @@ package easymap import ( "sync" - "github.com/go-developer/gopkg/convert" + "git.zhangdeman.cn/zhangdeman/gopkg/convert" ) // NewNormal 获取map实例 diff --git a/easymap/segment.go b/easymap/segment.go index e5a642b..c1efab8 100644 --- a/easymap/segment.go +++ b/easymap/segment.go @@ -8,7 +8,7 @@ package easymap import ( - "github.com/go-developer/gopkg/util" + "git.zhangdeman.cn/zhangdeman/gopkg/util" ) // NewSegment 获取分段map实例 diff --git a/easymap/sync_normal.go b/easymap/sync_normal.go index c989189..f5e3dd5 100644 --- a/easymap/sync_normal.go +++ b/easymap/sync_normal.go @@ -10,7 +10,7 @@ package easymap import ( "sync" - "github.com/go-developer/gopkg/convert" + "git.zhangdeman.cn/zhangdeman/gopkg/convert" ) func NewSync() EasyMap { diff --git a/easymap/sync_segment.go b/easymap/sync_segment.go index 2b38693..ba3ad45 100644 --- a/easymap/sync_segment.go +++ b/easymap/sync_segment.go @@ -8,7 +8,7 @@ package easymap import ( - "github.com/go-developer/gopkg/util" + "git.zhangdeman.cn/zhangdeman/gopkg/util" ) // NewSegmentSync 获取SegmentSync实例 diff --git a/gin/api/register.go b/gin/api/register.go index dc9b12b..221ca82 100644 --- a/gin/api/register.go +++ b/gin/api/register.go @@ -11,7 +11,7 @@ import ( "log" "reflect" - "github.com/go-developer/gopkg/gin/util" + "git.zhangdeman.cn/zhangdeman/gopkg/gin/util" "github.com/pkg/errors" diff --git a/gin/middleware/init_request.go b/gin/middleware/init_request.go index b12aca8..4717100 100644 --- a/gin/middleware/init_request.go +++ b/gin/middleware/init_request.go @@ -10,8 +10,8 @@ package middleware import ( "time" + commonUtil "git.zhangdeman.cn/zhangdeman/gopkg/util" "github.com/gin-gonic/gin" - commonUtil "github.com/go-developer/gopkg/util" ) // InitRequest 初始化请求信息,统一设置请求时间/请求ID等信息 diff --git a/go.mod b/go.mod index e126830..d4e6f9d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/go-developer/gopkg +module git.zhangdeman.cn/zhangdeman/gopkg go 1.15 @@ -15,7 +15,7 @@ require ( github.com/tidwall/gjson v1.6.8 github.com/tidwall/pretty v1.1.0 // indirect go.uber.org/zap v1.16.0 - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/mysql v1.0.4 gorm.io/gorm v1.20.12 ) diff --git a/go.sum b/go.sum index 38807c6..ca2eb4d 100644 --- a/go.sum +++ b/go.sum @@ -42,11 +42,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= @@ -56,11 +53,9 @@ github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9q github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -93,11 +88,9 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -114,7 +107,6 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opentelemetry.io/otel v0.17.0 h1:6MKOu8WY4hmfpQ4oQn34u6rYhnf2sWf1LXYO/UFm71U= go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= @@ -135,7 +127,6 @@ go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -152,7 +143,6 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/Lt golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -192,16 +182,13 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/json/build.go b/json/build.go index a2af63e..56a42ee 100644 --- a/json/build.go +++ b/json/build.go @@ -13,7 +13,7 @@ import ( "strconv" "strings" - "github.com/go-developer/gopkg/easylock" + "git.zhangdeman.cn/zhangdeman/gopkg/easylock" "github.com/pkg/errors" ) diff --git a/json/parse.go b/json/parse.go index bd60f4c..092924d 100644 --- a/json/parse.go +++ b/json/parse.go @@ -17,7 +17,7 @@ import ( "github.com/pkg/errors" - "github.com/go-developer/gopkg/util" + "git.zhangdeman.cn/zhangdeman/gopkg/util" ) // NewParseJSONTree 获取解析的实例 diff --git a/logger/wrapper/gorm_v2.go b/logger/wrapper/gorm_v2.go index fc32617..47f6352 100644 --- a/logger/wrapper/gorm_v2.go +++ b/logger/wrapper/gorm_v2.go @@ -18,7 +18,7 @@ import ( "go.uber.org/zap" - logger2 "github.com/go-developer/gopkg/logger" + logger2 "git.zhangdeman.cn/zhangdeman/gopkg/logger" "gorm.io/gorm/logger" ) diff --git a/logger/wrapper/http_gin.go b/logger/wrapper/http_gin.go index 951f813..c44bf56 100644 --- a/logger/wrapper/http_gin.go +++ b/logger/wrapper/http_gin.go @@ -10,9 +10,9 @@ package wrapper import ( "encoding/json" + "git.zhangdeman.cn/zhangdeman/gopkg/logger" + logger2 "git.zhangdeman.cn/zhangdeman/gopkg/logger" "github.com/gin-gonic/gin" - "github.com/go-developer/gopkg/logger" - logger2 "github.com/go-developer/gopkg/logger" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/middleware/mysql/client.go b/middleware/mysql/client.go index 0447655..c398e05 100644 --- a/middleware/mysql/client.go +++ b/middleware/mysql/client.go @@ -10,7 +10,7 @@ package mysql import ( "fmt" - "github.com/go-developer/gopkg/logger/wrapper" + "git.zhangdeman.cn/zhangdeman/gopkg/logger/wrapper" "gorm.io/driver/mysql" "gorm.io/gorm" diff --git a/middleware/mysql/define.go b/middleware/mysql/define.go index eb4ca03..1469de9 100644 --- a/middleware/mysql/define.go +++ b/middleware/mysql/define.go @@ -8,7 +8,7 @@ package mysql import ( - "github.com/go-developer/gopkg/logger" + "git.zhangdeman.cn/zhangdeman/gopkg/logger" "go.uber.org/zap/zapcore" ) diff --git a/middleware/redis/client.go b/middleware/redis/client.go index efba2c8..b187b5e 100644 --- a/middleware/redis/client.go +++ b/middleware/redis/client.go @@ -11,9 +11,9 @@ import ( "strings" "time" - "github.com/go-developer/gopkg/convert" + "git.zhangdeman.cn/zhangdeman/gopkg/convert" - "github.com/go-developer/gopkg/logger" + "git.zhangdeman.cn/zhangdeman/gopkg/logger" redisInstance "github.com/go-redis/redis/v8" "go.uber.org/zap" ) diff --git a/middleware/redis/context.go b/middleware/redis/context.go index d7fe806..30e080b 100644 --- a/middleware/redis/context.go +++ b/middleware/redis/context.go @@ -10,7 +10,7 @@ package redis import ( "context" - "github.com/go-developer/gopkg/easymap" + "git.zhangdeman.cn/zhangdeman/gopkg/easymap" "github.com/gin-gonic/gin" ) diff --git a/middleware/redis/logger.go b/middleware/redis/logger.go index d050151..e329fbf 100644 --- a/middleware/redis/logger.go +++ b/middleware/redis/logger.go @@ -8,7 +8,7 @@ package redis import ( - "github.com/go-developer/gopkg/logger" + "git.zhangdeman.cn/zhangdeman/gopkg/logger" "go.uber.org/zap/zapcore" ) diff --git a/safe/ip.go b/safe/ip.go index 4a0114a..2f6bb2d 100644 --- a/safe/ip.go +++ b/safe/ip.go @@ -8,7 +8,7 @@ package safe import ( - "github.com/go-developer/gopkg/easymap" + "git.zhangdeman.cn/zhangdeman/gopkg/easymap" "github.com/pkg/errors" ) diff --git a/try/iTry.go b/try/iTry.go index f6fc7c3..fa07183 100644 --- a/try/iTry.go +++ b/try/iTry.go @@ -10,10 +10,11 @@ package try import ( "encoding/json" "fmt" - "github.com/gin-gonic/gin" - "github.com/go-developer/gopkg/easymap" - "github.com/pkg/errors" "runtime" + + "git.zhangdeman.cn/zhangdeman/gopkg/easymap" + "github.com/gin-gonic/gin" + "github.com/pkg/errors" ) // ICatchHandler catch处理 @@ -127,4 +128,4 @@ func WithInterface(data interface{}, f func(data interface{})) ICatchHandler { f(data) }() return t -} \ No newline at end of file +}