diff --git a/README.md b/README.md index 406b6757..aac2eedf 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ 📦 Golang 扩展包 [comment]: <> (go) -[![Release](https://img.shields.io/github/release/dtapps/go-library.svg)](https://github.com/dtapps/go-library/releases/latest) -[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/dtapps/go-library) -[![go](https://github.com/dtapps/go-library/actions/workflows/go.yml/badge.svg)](https://github.com/dtapps/go-library/actions/workflows/go.yml) -[![godoc](https://pkg.go.dev/badge/github.com/dtapps/go-library?status.svg)](https://pkg.go.dev/github.com/dtapps/go-library) -[![goproxy.cn](https://goproxy.cn/stats/github.com/dtapps/go-library/badges/download-count.svg)](https://goproxy.cn/stats/github.com/dtapps/go-library) -[![goreportcard.com](https://goreportcard.com/badge/github.com/dtapps/go-library)](https://goreportcard.com/report/github.com/dtapps/go-library) +[![Release](https://img.shields.io/github/release/dtapps/go-library.svg)](https://gopkg.in/dtapps/go-library.v2/releases/latest) +[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://gopkg.in/dtapps/go-library.v2) +[![go](https://gopkg.in/dtapps/go-library.v2/actions/workflows/go.yml/badge.svg)](https://gopkg.in/dtapps/go-library.v2/actions/workflows/go.yml) +[![godoc](https://pkg.go.dev/badge/gopkg.in/dtapps/go-library.v2?status.svg)](https://pkg.go.dev/gopkg.in/dtapps/go-library.v2) +[![goproxy.cn](https://goproxy.cn/stats/gopkg.in/dtapps/go-library.v2/badges/download-count.svg)](https://goproxy.cn/stats/gopkg.in/dtapps/go-library.v2) +[![goreportcard.com](https://goreportcard.com/badge/gopkg.in/dtapps/go-library.v2)](https://goreportcard.com/report/gopkg.in/dtapps/go-library.v2) [![deps.dev](https://img.shields.io/badge/deps-go-red.svg)](https://deps.dev/go/github.com%2Fdtapps%2Fgo-library) [![Coverage Status](https://coveralls.io/repos/github/dtapps/go-library/badge.svg?branch=master)](https://coveralls.io/github/dtapps/go-library?branch=master) -[![Sourcegraph](https://sourcegraph.com/github.com/dtapps/go-library/-/badge.svg)](https://sourcegraph.com/github.com/dtapps/go-library?badge) +[![Sourcegraph](https://sourcegraph.com/gopkg.in/dtapps/go-library.v2/-/badge.svg)](https://sourcegraph.com/gopkg.in/dtapps/go-library.v2?badge) [![Build status](https://ci.appveyor.com/api/projects/status/d6rq6xynt8wkev5k?svg=true)](https://ci.appveyor.com/project/dtapps/go-library) [![codecov](https://codecov.io/gh/dtapps/go-library/branch/master/graph/badge.svg?token=BrtbyKKPQX)](https://codecov.io/gh/dtapps/go-library) [![Build Status](https://app.travis-ci.com/dtapps/go-library.svg?branch=master)](https://app.travis-ci.com/dtapps/go-library) @@ -21,10 +21,10 @@ #### 安装使用 ```go -go get -v -u github.com/dtapps/go-library +go get -v -u gopkg.in/dtapps/go-library.v2 import ( - "github.com/dtapps/go-library" + "gopkg.in/dtapps/go-library.v2" ) ``` @@ -36,7 +36,7 @@ import ( ```go import ( - "github.com/dtapps/go-library/utils/gotime" + "gopkg.in/dtapps/go-library.v2/utils/gotime" ) gotime.Current().Now() @@ -55,6 +55,6 @@ gotime.Current().TimestampWithMillisecond() ## 🔑 License -[MIT](https://github.com/dtapps/go-library/blob/master/LICENSE) +[MIT](https://gopkg.in/dtapps/go-library.v2/blob/master/LICENSE) Copyright (c) 2018 茂名聚合科技有限公司 \ No newline at end of file diff --git a/go.mod b/go.mod index c627b12e..82c88ad6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/dtapps/go-library +module gopkg.in/dtapps/go-library.v2 go 1.17 diff --git a/library.go b/library.go deleted file mode 100644 index 10af127b..00000000 --- a/library.go +++ /dev/null @@ -1,5 +0,0 @@ -package go_library - -func Version() string { - return "v1.0.41" -} diff --git a/library_test.go b/library_test.go deleted file mode 100644 index d5da855c..00000000 --- a/library_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package go_library - -import ( - "testing" -) - -func TestVersion(t *testing.T) { - t.Log(Version()) -} diff --git a/service/dingdanxia/app.go b/service/dingdanxia/app.go index 64ea3a1c..6757e65b 100644 --- a/service/dingdanxia/app.go +++ b/service/dingdanxia/app.go @@ -1,9 +1,8 @@ package dingdanxia import ( + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "net/http" - - "github.com/dtapps/go-library/utils/gohttp" ) type App struct { diff --git a/service/dingtalk/dingtalk.go b/service/dingtalk/dingtalk.go index 1b4b2c2e..dfc39962 100644 --- a/service/dingtalk/dingtalk.go +++ b/service/dingtalk/dingtalk.go @@ -6,9 +6,9 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/dtapps/go-library/service/dingtalk/config" - "github.com/dtapps/go-library/service/dingtalk/message" - "github.com/dtapps/go-library/utils/gojson" + "gopkg.in/dtapps/go-library.v2/service/dingtalk/config" + "gopkg.in/dtapps/go-library.v2/service/dingtalk/message" + "gopkg.in/dtapps/go-library.v2/utils/gojson" "io/ioutil" "net/http" "strings" diff --git a/service/dingtalk/dingtalk_test.go b/service/dingtalk/dingtalk_test.go index c1d8a4c5..6e049181 100644 --- a/service/dingtalk/dingtalk_test.go +++ b/service/dingtalk/dingtalk_test.go @@ -2,7 +2,7 @@ package dingtalk import ( "fmt" - "github.com/dtapps/go-library/service/dingtalk/message" + "gopkg.in/dtapps/go-library.v2/service/dingtalk/message" "testing" ) diff --git a/service/eastiot/app.go b/service/eastiot/app.go index 0230dcb8..28e21237 100644 --- a/service/eastiot/app.go +++ b/service/eastiot/app.go @@ -1,7 +1,7 @@ package eastiot import ( - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "net/http" "time" ) diff --git a/service/eastiot/sign.go b/service/eastiot/sign.go index b0ff1d58..024e4c6a 100644 --- a/service/eastiot/sign.go +++ b/service/eastiot/sign.go @@ -3,7 +3,7 @@ package eastiot import ( "encoding/json" "fmt" - "github.com/dtapps/go-library/utils/gomd5" + "gopkg.in/dtapps/go-library.v2/utils/gomd5" "sort" "strconv" ) diff --git a/service/ejiaofei/app.go b/service/ejiaofei/app.go index 3ac3af08..a705e828 100644 --- a/service/ejiaofei/app.go +++ b/service/ejiaofei/app.go @@ -2,8 +2,8 @@ package ejiaofei import ( "fmt" - "github.com/dtapps/go-library/utils/gohttp" - "github.com/dtapps/go-library/utils/gomd5" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gomd5" "net/http" ) diff --git a/service/ip/app.go b/service/ip/app.go index 5130eff7..5b4faa47 100644 --- a/service/ip/app.go +++ b/service/ip/app.go @@ -1,9 +1,9 @@ package ip import ( - "github.com/dtapps/go-library/service/ip/ip2region" - v4 "github.com/dtapps/go-library/service/ip/v4" - v6 "github.com/dtapps/go-library/service/ip/v6" + "gopkg.in/dtapps/go-library.v2/service/ip/ip2region" + v4 "gopkg.in/dtapps/go-library.v2/service/ip/v4" + v6 "gopkg.in/dtapps/go-library.v2/service/ip/v6" "os" "strings" ) diff --git a/service/ip/ip2region/ip2region.go b/service/ip/ip2region/ip2region.go index 27cfaaa3..4bcf4d9a 100644 --- a/service/ip/ip2region/ip2region.go +++ b/service/ip/ip2region/ip2region.go @@ -3,7 +3,7 @@ package ip2region import ( _ "embed" "errors" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "os" "strconv" "strings" diff --git a/service/ip/v4/ipv4.go b/service/ip/v4/ipv4.go index faed59a0..850bf9b4 100644 --- a/service/ip/v4/ipv4.go +++ b/service/ip/v4/ipv4.go @@ -3,8 +3,8 @@ package v4 import ( _ "embed" "encoding/binary" - "github.com/dtapps/go-library/utils/gostring" "golang.org/x/text/encoding/simplifiedchinese" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "net" ) diff --git a/service/ip/v6/ipv6.go b/service/ip/v6/ipv6.go index b245bfae..d793dc23 100644 --- a/service/ip/v6/ipv6.go +++ b/service/ip/v6/ipv6.go @@ -3,7 +3,7 @@ package v6 import ( _ "embed" "encoding/binary" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "math/big" "net" "strings" diff --git a/service/jd/app.go b/service/jd/app.go index 5af105e2..1ee4e928 100644 --- a/service/jd/app.go +++ b/service/jd/app.go @@ -2,7 +2,7 @@ package jd import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" ) type App struct { diff --git a/service/kashangwl/app.go b/service/kashangwl/app.go index f8f35a44..ef1b3593 100644 --- a/service/kashangwl/app.go +++ b/service/kashangwl/app.go @@ -2,7 +2,7 @@ package kashangwl import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "time" ) diff --git a/service/kashangwl/sign.go b/service/kashangwl/sign.go index f2fbe561..aed95e13 100644 --- a/service/kashangwl/sign.go +++ b/service/kashangwl/sign.go @@ -5,7 +5,7 @@ import ( "crypto/md5" "encoding/hex" "encoding/json" - "github.com/dtapps/go-library/utils/goparams" + "gopkg.in/dtapps/go-library.v2/utils/goparams" "io" "net/url" "sort" diff --git a/service/meituan/app.go b/service/meituan/app.go index e3f3d42f..09b73fa9 100644 --- a/service/meituan/app.go +++ b/service/meituan/app.go @@ -2,7 +2,7 @@ package meituan import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "net/http" ) diff --git a/service/meituan/order_list.go b/service/meituan/order_list.go index 7b3a0caa..122e02b0 100644 --- a/service/meituan/order_list.go +++ b/service/meituan/order_list.go @@ -2,7 +2,7 @@ package meituan import ( "encoding/json" - "github.com/dtapps/go-library/utils/gotime" + "gopkg.in/dtapps/go-library.v2/utils/gotime" ) // OrderList 请求参数 diff --git a/service/pinduoduo/app.go b/service/pinduoduo/app.go index b1a8ba59..3431f512 100644 --- a/service/pinduoduo/app.go +++ b/service/pinduoduo/app.go @@ -3,8 +3,8 @@ package pinduoduo import ( "encoding/json" "fmt" - "github.com/dtapps/go-library/utils/gohttp" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "regexp" "strconv" "strings" diff --git a/service/taobao/app.go b/service/taobao/app.go index 54595ac6..8a3d3598 100644 --- a/service/taobao/app.go +++ b/service/taobao/app.go @@ -3,8 +3,8 @@ package taobao import ( "encoding/json" "fmt" - "github.com/dtapps/go-library/utils/gohttp" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "regexp" "strconv" ) diff --git a/service/tianyancha/app.go b/service/tianyancha/app.go index ce61462e..b09eda92 100644 --- a/service/tianyancha/app.go +++ b/service/tianyancha/app.go @@ -2,7 +2,7 @@ package tianyancha import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "net/http" ) diff --git a/service/wechatmp/share.go b/service/wechatmp/share.go index 7886ddaf..072b57ab 100644 --- a/service/wechatmp/share.go +++ b/service/wechatmp/share.go @@ -3,7 +3,7 @@ package wechatmp import ( "crypto/sha1" "fmt" - "github.com/dtapps/go-library/utils/gorandom" + "gopkg.in/dtapps/go-library.v2/utils/gorandom" "io" "time" ) diff --git a/service/wechatpayapiv3/app.go b/service/wechatpayapiv3/app.go index 84a84826..80ab09f2 100644 --- a/service/wechatpayapiv3/app.go +++ b/service/wechatpayapiv3/app.go @@ -3,7 +3,7 @@ package wechatpayapiv3 import ( "bytes" "encoding/json" - "github.com/dtapps/go-library/utils/gorequest" + "gopkg.in/dtapps/go-library.v2/utils/gorequest" "io/ioutil" "net/http" ) diff --git a/service/wechatpayapiv3/pay.jsapi.go b/service/wechatpayapiv3/pay.jsapi.go index 94daccaf..7a881b55 100644 --- a/service/wechatpayapiv3/pay.jsapi.go +++ b/service/wechatpayapiv3/pay.jsapi.go @@ -2,7 +2,7 @@ package wechatpayapiv3 import ( "fmt" - "github.com/dtapps/go-library/utils/gorandom" + "gopkg.in/dtapps/go-library.v2/utils/gorandom" "time" ) diff --git a/service/wechatpayapiv3/sign.go b/service/wechatpayapiv3/sign.go index 2bcc9006..2018f056 100644 --- a/service/wechatpayapiv3/sign.go +++ b/service/wechatpayapiv3/sign.go @@ -13,7 +13,7 @@ import ( "encoding/pem" "errors" "fmt" - "github.com/dtapps/go-library/utils/gorandom" + "gopkg.in/dtapps/go-library.v2/utils/gorandom" "net/url" "time" ) diff --git a/service/wechatqy/app.go b/service/wechatqy/app.go index f665802f..da012f69 100644 --- a/service/wechatqy/app.go +++ b/service/wechatqy/app.go @@ -2,7 +2,7 @@ package wechatqy import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" ) type App struct { diff --git a/service/wechatunion/app.go b/service/wechatunion/app.go index e4e3fe00..9980c862 100644 --- a/service/wechatunion/app.go +++ b/service/wechatunion/app.go @@ -2,7 +2,7 @@ package wechatunion import ( "encoding/json" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" "net/http" ) diff --git a/service/wikeyun/app.go b/service/wikeyun/app.go index 0d8e5c02..de5e9f47 100644 --- a/service/wikeyun/app.go +++ b/service/wikeyun/app.go @@ -2,7 +2,7 @@ package wikeyun import ( "fmt" - "github.com/dtapps/go-library/utils/gohttp" + "gopkg.in/dtapps/go-library.v2/utils/gohttp" ) type App struct { diff --git a/utils/gohttp/gohttp.go b/utils/gohttp/gohttp.go index 3e417ede..1d44c0c8 100644 --- a/utils/gohttp/gohttp.go +++ b/utils/gohttp/gohttp.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" "fmt" - "github.com/dtapps/go-library/utils/gorequest" + "gopkg.in/dtapps/go-library.v2/utils/gorequest" "io/ioutil" "net/http" "net/url" diff --git a/utils/gophp/gophp.go b/utils/gophp/gophp.go index 834ff7be..f594d0d9 100644 --- a/utils/gophp/gophp.go +++ b/utils/gophp/gophp.go @@ -1,6 +1,6 @@ package gophp -import "github.com/dtapps/go-library/utils/gophp/serialize" +import "gopkg.in/dtapps/go-library.v2/utils/gophp/serialize" // Serialize 序列 func Serialize(value interface{}) ([]byte, error) { diff --git a/utils/gophp/serialize/serialize.go b/utils/gophp/serialize/serialize.go index 5015c1f8..ec7b26b0 100644 --- a/utils/gophp/serialize/serialize.go +++ b/utils/gophp/serialize/serialize.go @@ -3,8 +3,8 @@ package serialize import ( "bytes" "fmt" - "github.com/dtapps/go-library/utils/goless" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/goless" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "reflect" "sort" ) diff --git a/utils/gophp/serialize/unserialize.go b/utils/gophp/serialize/unserialize.go index 56894f81..8f454345 100644 --- a/utils/gophp/serialize/unserialize.go +++ b/utils/gophp/serialize/unserialize.go @@ -3,7 +3,7 @@ package serialize import ( "bytes" "fmt" - "github.com/dtapps/go-library/utils/gostring" + "gopkg.in/dtapps/go-library.v2/utils/gostring" "strconv" ) diff --git a/utils/gouuid/gouuid_test.go b/utils/gouuid/gouuid_test.go index 870d2696..2d425d75 100644 --- a/utils/gouuid/gouuid_test.go +++ b/utils/gouuid/gouuid_test.go @@ -2,7 +2,7 @@ package gouuid_test import ( "fmt" - "github.com/dtapps/go-library/utils/gouuid" + "gopkg.in/dtapps/go-library.v2/utils/gouuid" "testing" )