diff --git a/goaes/goaes.go b/utils/goaes/goaes.go similarity index 100% rename from goaes/goaes.go rename to utils/goaes/goaes.go diff --git a/goarray/goarray.go b/utils/goarray/goarray.go similarity index 100% rename from goarray/goarray.go rename to utils/goarray/goarray.go diff --git a/gobase64/gobase64.go b/utils/gobase64/gobase64.go similarity index 95% rename from gobase64/gobase64.go rename to utils/gobase64/gobase64.go index f31a5403..40430c7c 100644 --- a/gobase64/gobase64.go +++ b/utils/gobase64/gobase64.go @@ -2,7 +2,7 @@ package gobase64 import ( "encoding/base64" - "go.dtapp.net/library/gophp" + "go.dtapp.net/library/utils/gophp" ) // Encode base64编码 diff --git a/gocache/big.go b/utils/gocache/big.go similarity index 100% rename from gocache/big.go rename to utils/gocache/big.go diff --git a/gocache/big_cache.go b/utils/gocache/big_cache.go similarity index 100% rename from gocache/big_cache.go rename to utils/gocache/big_cache.go diff --git a/gocache/connom.go b/utils/gocache/connom.go similarity index 100% rename from gocache/connom.go rename to utils/gocache/connom.go diff --git a/gocache/etcd.go b/utils/gocache/etcd.go similarity index 100% rename from gocache/etcd.go rename to utils/gocache/etcd.go diff --git a/gocache/fast.go b/utils/gocache/fast.go similarity index 100% rename from gocache/fast.go rename to utils/gocache/fast.go diff --git a/gocache/free.go b/utils/gocache/free.go similarity index 100% rename from gocache/free.go rename to utils/gocache/free.go diff --git a/gocache/go.go b/utils/gocache/go.go similarity index 100% rename from gocache/go.go rename to utils/gocache/go.go diff --git a/gocache/go_cache.go b/utils/gocache/go_cache.go similarity index 100% rename from gocache/go_cache.go rename to utils/gocache/go_cache.go diff --git a/gocache/group.go b/utils/gocache/group.go similarity index 100% rename from gocache/group.go rename to utils/gocache/group.go diff --git a/gocache/memcached.go b/utils/gocache/memcached.go similarity index 100% rename from gocache/memcached.go rename to utils/gocache/memcached.go diff --git a/gocache/memcached_cache.go b/utils/gocache/memcached_cache.go similarity index 100% rename from gocache/memcached_cache.go rename to utils/gocache/memcached_cache.go diff --git a/gocache/redis.go b/utils/gocache/redis.go similarity index 100% rename from gocache/redis.go rename to utils/gocache/redis.go diff --git a/gocache/redis_cache.go b/utils/gocache/redis_cache.go similarity index 100% rename from gocache/redis_cache.go rename to utils/gocache/redis_cache.go diff --git a/gocache/ristretto.go b/utils/gocache/ristretto.go similarity index 100% rename from gocache/ristretto.go rename to utils/gocache/ristretto.go diff --git a/gocache/ristretto_cache.go b/utils/gocache/ristretto_cache.go similarity index 100% rename from gocache/ristretto_cache.go rename to utils/gocache/ristretto_cache.go diff --git a/godecimal/godecimal.go b/utils/godecimal/godecimal.go similarity index 98% rename from godecimal/godecimal.go rename to utils/godecimal/godecimal.go index 8e8da8c7..c3ef01e8 100644 --- a/godecimal/godecimal.go +++ b/utils/godecimal/godecimal.go @@ -2,7 +2,7 @@ package godecimal import ( "fmt" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "math" "strconv" ) diff --git a/goenv/goenv.go b/utils/goenv/goenv.go similarity index 93% rename from goenv/goenv.go rename to utils/goenv/goenv.go index 14627fb9..28d44785 100644 --- a/goenv/goenv.go +++ b/utils/goenv/goenv.go @@ -1,7 +1,7 @@ package goenv import ( - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "os" "strings" ) diff --git a/gofiles/gofiles.go b/utils/gofiles/gofiles.go similarity index 100% rename from gofiles/gofiles.go rename to utils/gofiles/gofiles.go diff --git a/gofloat/gofloat.go b/utils/gofloat/gofloat.go similarity index 100% rename from gofloat/gofloat.go rename to utils/gofloat/gofloat.go diff --git a/goget/goget.go b/utils/goget/goget.go similarity index 100% rename from goget/goget.go rename to utils/goget/goget.go diff --git a/goheader/goheader.go b/utils/goheader/goheader.go similarity index 100% rename from goheader/goheader.go rename to utils/goheader/goheader.go diff --git a/goint/goint.go b/utils/goint/goint.go similarity index 100% rename from goint/goint.go rename to utils/goint/goint.go diff --git a/goint64/goint64.go b/utils/goint64/goint64.go similarity index 100% rename from goint64/goint64.go rename to utils/goint64/goint64.go diff --git a/goip/analyse.go b/utils/goip/analyse.go similarity index 100% rename from goip/analyse.go rename to utils/goip/analyse.go diff --git a/goip/goip.go b/utils/goip/goip.go similarity index 90% rename from goip/goip.go rename to utils/goip/goip.go index 822842cc..249bc91c 100644 --- a/goip/goip.go +++ b/utils/goip/goip.go @@ -1,9 +1,9 @@ package goip import ( - "go.dtapp.net/library/goip/ip2region" - "go.dtapp.net/library/goip/v4" - "go.dtapp.net/library/goip/v6" + "go.dtapp.net/library/utils/goip/ip2region" + "go.dtapp.net/library/utils/goip/v4" + "go.dtapp.net/library/utils/goip/v6" "log" "strings" ) diff --git a/goip/ip.go b/utils/goip/ip.go similarity index 97% rename from goip/ip.go rename to utils/goip/ip.go index 0864f07d..879ac8a8 100644 --- a/goip/ip.go +++ b/utils/goip/ip.go @@ -2,7 +2,7 @@ package goip import ( "encoding/json" - "go.dtapp.net/library/gorequest" + "go.dtapp.net/library/utils/gorequest" "net" ) diff --git a/goip/ip2region/download.go b/utils/goip/ip2region/download.go similarity index 100% rename from goip/ip2region/download.go rename to utils/goip/ip2region/download.go diff --git a/goip/ip2region/ip2region.db b/utils/goip/ip2region/ip2region.db similarity index 100% rename from goip/ip2region/ip2region.db rename to utils/goip/ip2region/ip2region.db diff --git a/goip/ip2region/ip2region.go b/utils/goip/ip2region/ip2region.go similarity index 98% rename from goip/ip2region/ip2region.go rename to utils/goip/ip2region/ip2region.go index 38fcea3e..3f355cec 100644 --- a/goip/ip2region/ip2region.go +++ b/utils/goip/ip2region/ip2region.go @@ -3,7 +3,7 @@ package ip2region import ( _ "embed" "errors" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "io/ioutil" "log" "os" diff --git a/goip/v4/download.go b/utils/goip/v4/download.go similarity index 100% rename from goip/v4/download.go rename to utils/goip/v4/download.go diff --git a/goip/v4/ipv4.go b/utils/goip/v4/ipv4.go similarity index 99% rename from goip/v4/ipv4.go rename to utils/goip/v4/ipv4.go index 367a2cf6..8813f805 100644 --- a/goip/v4/ipv4.go +++ b/utils/goip/v4/ipv4.go @@ -4,7 +4,7 @@ import ( _ "embed" "encoding/binary" "errors" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "golang.org/x/text/encoding/simplifiedchinese" "io/ioutil" "log" diff --git a/goip/v4/qqwry.dat b/utils/goip/v4/qqwry.dat similarity index 100% rename from goip/v4/qqwry.dat rename to utils/goip/v4/qqwry.dat diff --git a/goip/v6/download.go b/utils/goip/v6/download.go similarity index 100% rename from goip/v6/download.go rename to utils/goip/v6/download.go diff --git a/goip/v6/ipv6.go b/utils/goip/v6/ipv6.go similarity index 99% rename from goip/v6/ipv6.go rename to utils/goip/v6/ipv6.go index 12ab9894..ee9ee381 100644 --- a/goip/v6/ipv6.go +++ b/utils/goip/v6/ipv6.go @@ -4,7 +4,7 @@ import ( _ "embed" "encoding/binary" "errors" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "io/ioutil" "log" "math/big" diff --git a/goip/v6/ipv6wry.db b/utils/goip/v6/ipv6wry.db similarity index 100% rename from goip/v6/ipv6wry.db rename to utils/goip/v6/ipv6wry.db diff --git a/gojobs/client.go b/utils/gojobs/client.go similarity index 100% rename from gojobs/client.go rename to utils/gojobs/client.go diff --git a/gojobs/consts.go b/utils/gojobs/consts.go similarity index 86% rename from gojobs/consts.go rename to utils/gojobs/consts.go index 2d1e36d3..01868ad4 100644 --- a/gojobs/consts.go +++ b/utils/gojobs/consts.go @@ -2,7 +2,7 @@ package gojobs import ( "fmt" - "go.dtapp.net/library/goip" + "go.dtapp.net/library/utils/goip" ) var ip string diff --git a/gojobs/cron.go b/utils/gojobs/cron.go similarity index 85% rename from gojobs/cron.go rename to utils/gojobs/cron.go index 61ab4dba..3c0912c3 100644 --- a/gojobs/cron.go +++ b/utils/gojobs/cron.go @@ -2,7 +2,7 @@ package gojobs import ( "context" - pb2 "go.dtapp.net/library/gojobs/pb" + "go.dtapp.net/library/utils/gojobs/pb" "google.golang.org/grpc" "log" ) @@ -15,7 +15,7 @@ type CronConfig struct { // Cron 定时任务 type Cron struct { CronConfig // 配置 - Pub pb2.PubSubClient // 订阅 + Pub pb.PubSubClient // 订阅 Conn *grpc.ClientConn // 链接信息 } @@ -39,13 +39,13 @@ func NewCron(config *CronConfig) *Cron { } // 新建一个客户端 - c.Pub = pb2.NewPubSubClient(c.Conn) + c.Pub = pb.NewPubSubClient(c.Conn) return c } // Send 发送 -func (c *Cron) Send(in *pb2.PublishRequest) (*pb2.PublishResponse, error) { +func (c *Cron) Send(in *pb.PublishRequest) (*pb.PublishResponse, error) { log.Printf("[定时任务]{广播开始}编号:%s 类型:%s ip:%s\n", in.GetId(), in.GetValue(), in.GetIp()) stream, err := c.Pub.Publish(context.Background(), in) if err != nil { diff --git a/gojobs/etcd.go b/utils/gojobs/etcd.go similarity index 100% rename from gojobs/etcd.go rename to utils/gojobs/etcd.go diff --git a/gojobs/etcd_curd.go b/utils/gojobs/etcd_curd.go similarity index 100% rename from gojobs/etcd_curd.go rename to utils/gojobs/etcd_curd.go diff --git a/gojobs/etcd_server.go b/utils/gojobs/etcd_server.go similarity index 100% rename from gojobs/etcd_server.go rename to utils/gojobs/etcd_server.go diff --git a/gojobs/etcd_worker.go b/utils/gojobs/etcd_worker.go similarity index 98% rename from gojobs/etcd_worker.go rename to utils/gojobs/etcd_worker.go index 4479ad82..587ba992 100644 --- a/gojobs/etcd_worker.go +++ b/utils/gojobs/etcd_worker.go @@ -4,7 +4,7 @@ import ( "context" "errors" "fmt" - "go.dtapp.net/library/goip" + "go.dtapp.net/library/utils/goip" "go.etcd.io/etcd/client/v3" "log" "time" diff --git a/gojobs/pb/basics.pb.go b/utils/gojobs/pb/basics.pb.go similarity index 100% rename from gojobs/pb/basics.pb.go rename to utils/gojobs/pb/basics.pb.go diff --git a/gojobs/pb/basics.proto b/utils/gojobs/pb/basics.proto similarity index 100% rename from gojobs/pb/basics.proto rename to utils/gojobs/pb/basics.proto diff --git a/gojobs/pb/basics_grpc.pb.go b/utils/gojobs/pb/basics_grpc.pb.go similarity index 100% rename from gojobs/pb/basics_grpc.pb.go rename to utils/gojobs/pb/basics_grpc.pb.go diff --git a/gojobs/pb/pubsub.pb.go b/utils/gojobs/pb/pubsub.pb.go similarity index 100% rename from gojobs/pb/pubsub.pb.go rename to utils/gojobs/pb/pubsub.pb.go diff --git a/gojobs/pb/pubsub.proto b/utils/gojobs/pb/pubsub.proto similarity index 100% rename from gojobs/pb/pubsub.proto rename to utils/gojobs/pb/pubsub.proto diff --git a/gojobs/pb/pubsub.server.go b/utils/gojobs/pb/pubsub.server.go similarity index 97% rename from gojobs/pb/pubsub.server.go rename to utils/gojobs/pb/pubsub.server.go index 47797d91..40274b30 100644 --- a/gojobs/pb/pubsub.server.go +++ b/utils/gojobs/pb/pubsub.server.go @@ -2,7 +2,7 @@ package pb import ( "context" - "go.dtapp.net/library/gojobs/pubsub" + "go.dtapp.net/library/utils/gojobs/pubsub" "log" "strings" "time" diff --git a/gojobs/pb/pubsub_grpc.pb.go b/utils/gojobs/pb/pubsub_grpc.pb.go similarity index 100% rename from gojobs/pb/pubsub_grpc.pb.go rename to utils/gojobs/pb/pubsub_grpc.pb.go diff --git a/gojobs/pb/task.pb.go b/utils/gojobs/pb/task.pb.go similarity index 100% rename from gojobs/pb/task.pb.go rename to utils/gojobs/pb/task.pb.go diff --git a/gojobs/pb/task.proto b/utils/gojobs/pb/task.proto similarity index 100% rename from gojobs/pb/task.proto rename to utils/gojobs/pb/task.proto diff --git a/gojobs/pb/task_grpc.pb.go b/utils/gojobs/pb/task_grpc.pb.go similarity index 100% rename from gojobs/pb/task_grpc.pb.go rename to utils/gojobs/pb/task_grpc.pb.go diff --git a/gojobs/pubsub/pubsub.go b/utils/gojobs/pubsub/pubsub.go similarity index 100% rename from gojobs/pubsub/pubsub.go rename to utils/gojobs/pubsub/pubsub.go diff --git a/gojobs/server.go b/utils/gojobs/server.go similarity index 91% rename from gojobs/server.go rename to utils/gojobs/server.go index 7c36bf92..8ce51c5c 100644 --- a/gojobs/server.go +++ b/utils/gojobs/server.go @@ -2,8 +2,8 @@ package gojobs import ( "errors" - pb2 "go.dtapp.net/library/gojobs/pb" - "go.dtapp.net/library/gojobs/pubsub" + "go.dtapp.net/library/utils/gojobs/pb" + "go.dtapp.net/library/utils/gojobs/pubsub" "google.golang.org/grpc" "log" "net" @@ -44,7 +44,7 @@ func NewServer(config *ServerConfig) *Server { s.Conn = grpc.NewServer() // 注册 - pb2.RegisterPubSubServer(s.Conn, pb2.NewPubSubServerService()) + pb.RegisterPubSubServer(s.Conn, pb.NewPubSubServerService()) return s } diff --git a/gojobs/worker.go b/utils/gojobs/worker.go similarity index 74% rename from gojobs/worker.go rename to utils/gojobs/worker.go index 5c5ebe2a..5778b9ee 100644 --- a/gojobs/worker.go +++ b/utils/gojobs/worker.go @@ -2,8 +2,8 @@ package gojobs import ( "context" - pb2 "go.dtapp.net/library/gojobs/pb" - "go.dtapp.net/library/gouuid" + "go.dtapp.net/library/utils/gojobs/pb" + "go.dtapp.net/library/utils/gouuid" "google.golang.org/grpc" ) @@ -16,7 +16,7 @@ type WorkerConfig struct { // Worker 工作 type Worker struct { WorkerConfig // 配置 - Pub pb2.PubSubClient // 订阅 + Pub pb.PubSubClient // 订阅 Conn *grpc.ClientConn // 链接信息 } @@ -44,14 +44,14 @@ func NewWorker(config *WorkerConfig) *Worker { } // 新建一个客户端 - w.Pub = pb2.NewPubSubClient(w.Conn) + w.Pub = pb.NewPubSubClient(w.Conn) return w } // SubscribeCron 订阅服务 -func (w *Worker) SubscribeCron() pb2.PubSub_SubscribeClient { - stream, err := w.Pub.Subscribe(context.Background(), &pb2.SubscribeRequest{ +func (w *Worker) SubscribeCron() pb.PubSub_SubscribeClient { + stream, err := w.Pub.Subscribe(context.Background(), &pb.SubscribeRequest{ Id: gouuid.GetUuId(), Value: prefix, Ip: w.ClientIp, @@ -63,8 +63,8 @@ func (w *Worker) SubscribeCron() pb2.PubSub_SubscribeClient { } // StartCron 启动任务 -func (w *Worker) StartCron() pb2.PubSub_SubscribeClient { - stream, err := w.Pub.Subscribe(context.Background(), &pb2.SubscribeRequest{ +func (w *Worker) StartCron() pb.PubSub_SubscribeClient { + stream, err := w.Pub.Subscribe(context.Background(), &pb.SubscribeRequest{ Id: gouuid.GetUuId(), Value: prefixSprintf(w.ClientIp), Ip: w.ClientIp, diff --git a/gojson/gojson.go b/utils/gojson/gojson.go similarity index 100% rename from gojson/gojson.go rename to utils/gojson/gojson.go diff --git a/golock/redis.go b/utils/golock/redis.go similarity index 96% rename from golock/redis.go rename to utils/golock/redis.go index 1a0b37eb..c15c064a 100644 --- a/golock/redis.go +++ b/utils/golock/redis.go @@ -1,7 +1,7 @@ package golock import ( - "go.dtapp.net/library/goredis" + "go.dtapp.net/library/utils/goredis" "time" ) diff --git a/golog/api.go b/utils/golog/api.go similarity index 98% rename from golog/api.go rename to utils/golog/api.go index 04d80556..769bf4c2 100644 --- a/golog/api.go +++ b/utils/golog/api.go @@ -1,7 +1,7 @@ package golog import ( - "go.dtapp.net/library/goip" + "go.dtapp.net/library/utils/goip" "gorm.io/datatypes" "gorm.io/gorm" "log" diff --git a/golog/gin.go b/utils/golog/gin.go similarity index 99% rename from golog/gin.go rename to utils/golog/gin.go index 3e84bf3f..f7169e32 100644 --- a/golog/gin.go +++ b/utils/golog/gin.go @@ -1,7 +1,7 @@ package golog import ( - "go.dtapp.net/library/goip" + "go.dtapp.net/library/utils/goip" "gorm.io/datatypes" "gorm.io/gorm" "log" diff --git a/golog/golog.go b/utils/golog/golog.go similarity index 100% rename from golog/golog.go rename to utils/golog/golog.go diff --git a/golog/json.go b/utils/golog/json.go similarity index 100% rename from golog/json.go rename to utils/golog/json.go diff --git a/golog/system.go b/utils/golog/system.go similarity index 100% rename from golog/system.go rename to utils/golog/system.go diff --git a/golog/time.go b/utils/golog/time.go similarity index 97% rename from golog/time.go rename to utils/golog/time.go index 826ab2c7..2050160c 100644 --- a/golog/time.go +++ b/utils/golog/time.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "errors" "fmt" - "go.dtapp.net/library/gotime" + "go.dtapp.net/library/utils/gotime" "gorm.io/gorm" "gorm.io/gorm/schema" "time" diff --git a/gomac/gomac.go b/utils/gomac/gomac.go similarity index 100% rename from gomac/gomac.go rename to utils/gomac/gomac.go diff --git a/gomail/godmail.go b/utils/gomail/godmail.go similarity index 100% rename from gomail/godmail.go rename to utils/gomail/godmail.go diff --git a/gomd5/gomd5.go b/utils/gomd5/gomd5.go similarity index 100% rename from gomd5/gomd5.go rename to utils/gomd5/gomd5.go diff --git a/gomongo/bson.go b/utils/gomongo/bson.go similarity index 100% rename from gomongo/bson.go rename to utils/gomongo/bson.go diff --git a/gomongo/client.go b/utils/gomongo/client.go similarity index 100% rename from gomongo/client.go rename to utils/gomongo/client.go diff --git a/gomongo/curd.go b/utils/gomongo/curd.go similarity index 100% rename from gomongo/curd.go rename to utils/gomongo/curd.go diff --git a/gomongo/json.go b/utils/gomongo/json.go similarity index 100% rename from gomongo/json.go rename to utils/gomongo/json.go diff --git a/gomongo/official.go b/utils/gomongo/official.go similarity index 100% rename from gomongo/official.go rename to utils/gomongo/official.go diff --git a/gomongo/time.go b/utils/gomongo/time.go similarity index 97% rename from gomongo/time.go rename to utils/gomongo/time.go index be10e69c..5e0c06d8 100644 --- a/gomongo/time.go +++ b/utils/gomongo/time.go @@ -1,7 +1,7 @@ package gomongo import ( - "go.dtapp.net/library/gotime" + "go.dtapp.net/library/utils/gotime" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/bsontype" "time" diff --git a/gomongo/xml.go b/utils/gomongo/xml.go similarity index 100% rename from gomongo/xml.go rename to utils/gomongo/xml.go diff --git a/gomysql/gomysql.go b/utils/gomysql/gomysql.go similarity index 100% rename from gomysql/gomysql.go rename to utils/gomysql/gomysql.go diff --git a/goorder/goorder.go b/utils/goorder/goorder.go similarity index 77% rename from goorder/goorder.go rename to utils/goorder/goorder.go index d04544ec..6edfbff5 100644 --- a/goorder/goorder.go +++ b/utils/goorder/goorder.go @@ -2,8 +2,8 @@ package goorder import ( "fmt" - "go.dtapp.net/library/gorandom" - "go.dtapp.net/library/gotime" + "go.dtapp.net/library/utils/gorandom" + "go.dtapp.net/library/utils/gotime" ) // GenerateOrDate 生成订单号 diff --git a/goparams/goparams.go b/utils/goparams/goparams.go similarity index 100% rename from goparams/goparams.go rename to utils/goparams/goparams.go diff --git a/gophp/gophp.go b/utils/gophp/gophp.go similarity index 95% rename from gophp/gophp.go rename to utils/gophp/gophp.go index 14b56cff..f9ace690 100644 --- a/gophp/gophp.go +++ b/utils/gophp/gophp.go @@ -1,7 +1,7 @@ package gophp import ( - serialize2 "go.dtapp.net/library/gophp/serialize" + "go.dtapp.net/library/utils/gophp/serialize" "strconv" "strings" "unicode" @@ -9,12 +9,12 @@ import ( // Serialize 序列 func Serialize(value any) ([]byte, error) { - return serialize2.Marshal(value) + return serialize.Marshal(value) } // Unserialize 反序列 func Unserialize(data []byte) (any, error) { - return serialize2.UnMarshal(data) + return serialize.UnMarshal(data) } func BaseConvert(number string, frombase, tobase int) (string, error) { diff --git a/gophp/serialize/less.go b/utils/gophp/serialize/less.go similarity index 100% rename from gophp/serialize/less.go rename to utils/gophp/serialize/less.go diff --git a/gophp/serialize/serialize.go b/utils/gophp/serialize/serialize.go similarity index 98% rename from gophp/serialize/serialize.go rename to utils/gophp/serialize/serialize.go index 9a3ca99e..3f5a8fbc 100644 --- a/gophp/serialize/serialize.go +++ b/utils/gophp/serialize/serialize.go @@ -3,7 +3,7 @@ package serialize import ( "bytes" "fmt" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "reflect" "sort" ) diff --git a/gophp/serialize/unserialize.go b/utils/gophp/serialize/unserialize.go similarity index 99% rename from gophp/serialize/unserialize.go rename to utils/gophp/serialize/unserialize.go index cd55ce1d..ff54df0e 100644 --- a/gophp/serialize/unserialize.go +++ b/utils/gophp/serialize/unserialize.go @@ -3,7 +3,7 @@ package serialize import ( "bytes" "fmt" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "strconv" ) diff --git a/gopostgres/gopostgres.go b/utils/gopostgres/gopostgres.go similarity index 100% rename from gopostgres/gopostgres.go rename to utils/gopostgres/gopostgres.go diff --git a/gopostgres/type.go b/utils/gopostgres/type.go similarity index 100% rename from gopostgres/type.go rename to utils/gopostgres/type.go diff --git a/gopreg/gopreg.go b/utils/gopreg/gopreg.go similarity index 100% rename from gopreg/gopreg.go rename to utils/gopreg/gopreg.go diff --git a/gorandom/gorandom.go b/utils/gorandom/gorandom.go similarity index 100% rename from gorandom/gorandom.go rename to utils/gorandom/gorandom.go diff --git a/goredis/Iterator.go b/utils/goredis/Iterator.go similarity index 100% rename from goredis/Iterator.go rename to utils/goredis/Iterator.go diff --git a/goredis/app.go b/utils/goredis/app.go similarity index 100% rename from goredis/app.go rename to utils/goredis/app.go diff --git a/goredis/hash_operation.go b/utils/goredis/hash_operation.go similarity index 100% rename from goredis/hash_operation.go rename to utils/goredis/hash_operation.go diff --git a/goredis/list_operation.go b/utils/goredis/list_operation.go similarity index 100% rename from goredis/list_operation.go rename to utils/goredis/list_operation.go diff --git a/goredis/operation_attr.go b/utils/goredis/operation_attr.go similarity index 100% rename from goredis/operation_attr.go rename to utils/goredis/operation_attr.go diff --git a/goredis/simple_cache.go b/utils/goredis/simple_cache.go similarity index 100% rename from goredis/simple_cache.go rename to utils/goredis/simple_cache.go diff --git a/goredis/simple_interface_cache.go b/utils/goredis/simple_interface_cache.go similarity index 100% rename from goredis/simple_interface_cache.go rename to utils/goredis/simple_interface_cache.go diff --git a/goredis/simple_json_cache.go b/utils/goredis/simple_json_cache.go similarity index 100% rename from goredis/simple_json_cache.go rename to utils/goredis/simple_json_cache.go diff --git a/goredis/simple_operation.go b/utils/goredis/simple_operation.go similarity index 100% rename from goredis/simple_operation.go rename to utils/goredis/simple_operation.go diff --git a/goredis/simple_result.go b/utils/goredis/simple_result.go similarity index 100% rename from goredis/simple_result.go rename to utils/goredis/simple_result.go diff --git a/goredis/simple_sring_cache.go b/utils/goredis/simple_sring_cache.go similarity index 100% rename from goredis/simple_sring_cache.go rename to utils/goredis/simple_sring_cache.go diff --git a/goredis/slice_result.go b/utils/goredis/slice_result.go similarity index 100% rename from goredis/slice_result.go rename to utils/goredis/slice_result.go diff --git a/goredis/string_operation.go b/utils/goredis/string_operation.go similarity index 100% rename from goredis/string_operation.go rename to utils/goredis/string_operation.go diff --git a/goredis/string_result.go b/utils/goredis/string_result.go similarity index 100% rename from goredis/string_result.go rename to utils/goredis/string_result.go diff --git a/gorequest/header.go b/utils/gorequest/header.go similarity index 100% rename from gorequest/header.go rename to utils/gorequest/header.go diff --git a/gorequest/http.go b/utils/gorequest/http.go similarity index 99% rename from gorequest/http.go rename to utils/gorequest/http.go index 30cd1ecf..cba3351b 100644 --- a/gorequest/http.go +++ b/utils/gorequest/http.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - "go.dtapp.net/library/gotime" + "go.dtapp.net/library/utils/gotime" "io" "io/ioutil" "net/http" diff --git a/gorequest/ip.go b/utils/gorequest/ip.go similarity index 100% rename from gorequest/ip.go rename to utils/gorequest/ip.go diff --git a/gorequest/params.go b/utils/gorequest/params.go similarity index 96% rename from gorequest/params.go rename to utils/gorequest/params.go index 15af62d5..948ad719 100644 --- a/gorequest/params.go +++ b/utils/gorequest/params.go @@ -2,7 +2,7 @@ package gorequest import ( "encoding/json" - "go.dtapp.net/library/gostring" + "go.dtapp.net/library/utils/gostring" "log" ) diff --git a/gorequest/url.go b/utils/gorequest/url.go similarity index 100% rename from gorequest/url.go rename to utils/gorequest/url.go diff --git a/gorequest/user_agent.go b/utils/gorequest/user_agent.go similarity index 100% rename from gorequest/user_agent.go rename to utils/gorequest/user_agent.go diff --git a/gorequest/xml.go b/utils/gorequest/xml.go similarity index 100% rename from gorequest/xml.go rename to utils/gorequest/xml.go diff --git a/gorsa/gorsa.go b/utils/gorsa/gorsa.go similarity index 100% rename from gorsa/gorsa.go rename to utils/gorsa/gorsa.go diff --git a/gosort/gosort.go b/utils/gosort/gosort.go similarity index 100% rename from gosort/gosort.go rename to utils/gosort/gosort.go diff --git a/gossh/gossh.go b/utils/gossh/gossh.go similarity index 100% rename from gossh/gossh.go rename to utils/gossh/gossh.go diff --git a/gossl/gossl.go b/utils/gossl/gossl.go similarity index 100% rename from gossl/gossl.go rename to utils/gossl/gossl.go diff --git a/gostorage/aliyun.go b/utils/gostorage/aliyun.go similarity index 100% rename from gostorage/aliyun.go rename to utils/gostorage/aliyun.go diff --git a/gostorage/baidu.go b/utils/gostorage/baidu.go similarity index 100% rename from gostorage/baidu.go rename to utils/gostorage/baidu.go diff --git a/gostorage/connom.go b/utils/gostorage/connom.go similarity index 100% rename from gostorage/connom.go rename to utils/gostorage/connom.go diff --git a/gostorage/huaweicloud.go b/utils/gostorage/huaweicloud.go similarity index 100% rename from gostorage/huaweicloud.go rename to utils/gostorage/huaweicloud.go diff --git a/gostorage/jdcloud.go b/utils/gostorage/jdcloud.go similarity index 100% rename from gostorage/jdcloud.go rename to utils/gostorage/jdcloud.go diff --git a/gostorage/ksyun.go b/utils/gostorage/ksyun.go similarity index 100% rename from gostorage/ksyun.go rename to utils/gostorage/ksyun.go diff --git a/gostorage/qiniu.go b/utils/gostorage/qiniu.go similarity index 100% rename from gostorage/qiniu.go rename to utils/gostorage/qiniu.go diff --git a/gostorage/tencent.go b/utils/gostorage/tencent.go similarity index 100% rename from gostorage/tencent.go rename to utils/gostorage/tencent.go diff --git a/gostorage/upyun.go b/utils/gostorage/upyun.go similarity index 100% rename from gostorage/upyun.go rename to utils/gostorage/upyun.go diff --git a/gostring/gostring.go b/utils/gostring/gostring.go similarity index 100% rename from gostring/gostring.go rename to utils/gostring/gostring.go diff --git a/gotime/compare.go b/utils/gotime/compare.go similarity index 100% rename from gotime/compare.go rename to utils/gotime/compare.go diff --git a/gotime/differ.go b/utils/gotime/differ.go similarity index 100% rename from gotime/differ.go rename to utils/gotime/differ.go diff --git a/gotime/errors.go b/utils/gotime/errors.go similarity index 100% rename from gotime/errors.go rename to utils/gotime/errors.go diff --git a/gotime/gotime.go b/utils/gotime/gotime.go similarity index 100% rename from gotime/gotime.go rename to utils/gotime/gotime.go diff --git a/gotime/location.go b/utils/gotime/location.go similarity index 100% rename from gotime/location.go rename to utils/gotime/location.go diff --git a/gotime/mongo.go b/utils/gotime/mongo.go similarity index 100% rename from gotime/mongo.go rename to utils/gotime/mongo.go diff --git a/gotime/start_end.go b/utils/gotime/start_end.go similarity index 100% rename from gotime/start_end.go rename to utils/gotime/start_end.go diff --git a/gotime/today.go b/utils/gotime/today.go similarity index 100% rename from gotime/today.go rename to utils/gotime/today.go diff --git a/gotime/tomorrow.go b/utils/gotime/tomorrow.go similarity index 100% rename from gotime/tomorrow.go rename to utils/gotime/tomorrow.go diff --git a/gotime/yesterday.go b/utils/gotime/yesterday.go similarity index 100% rename from gotime/yesterday.go rename to utils/gotime/yesterday.go diff --git a/gourl/gourl.go b/utils/gourl/gourl.go similarity index 100% rename from gourl/gourl.go rename to utils/gourl/gourl.go diff --git a/gouuid/gouuid.go b/utils/gouuid/gouuid.go similarity index 100% rename from gouuid/gouuid.go rename to utils/gouuid/gouuid.go diff --git a/goxml/goxml.go b/utils/goxml/goxml.go similarity index 100% rename from goxml/goxml.go rename to utils/goxml/goxml.go diff --git a/jobs/check.go b/utils/jobs/check.go similarity index 93% rename from jobs/check.go rename to utils/jobs/check.go index 5547bc6e..5ad61f21 100644 --- a/jobs/check.go +++ b/utils/jobs/check.go @@ -1,7 +1,7 @@ package jobs import ( - "go.dtapp.net/library/gotime" + "go.dtapp.net/library/utils/gotime" "gorm.io/gorm" "log" ) diff --git a/jobs/const.go b/utils/jobs/const.go similarity index 100% rename from jobs/const.go rename to utils/jobs/const.go diff --git a/jobs/ip.go b/utils/jobs/ip.go similarity index 90% rename from jobs/ip.go rename to utils/jobs/ip.go index 0acfc05f..36f147d2 100644 --- a/jobs/ip.go +++ b/utils/jobs/ip.go @@ -1,7 +1,7 @@ package jobs import ( - "go.dtapp.net/library/goip" + "go.dtapp.net/library/utils/goip" "gorm.io/gorm" ) diff --git a/jobs/jobs.go b/utils/jobs/jobs.go similarity index 98% rename from jobs/jobs.go rename to utils/jobs/jobs.go index 5b7b8ec4..122a2e38 100644 --- a/jobs/jobs.go +++ b/utils/jobs/jobs.go @@ -1,10 +1,10 @@ package jobs import ( - "go.dtapp.net/library/gojson" - "go.dtapp.net/library/goredis" - "go.dtapp.net/library/gotime" - "go.dtapp.net/library/gouuid" + "go.dtapp.net/library/utils/gojson" + "go.dtapp.net/library/utils/goredis" + "go.dtapp.net/library/utils/gotime" + "go.dtapp.net/library/utils/gouuid" "gorm.io/gorm" "log" ) diff --git a/jobs/lock.go b/utils/jobs/lock.go similarity index 96% rename from jobs/lock.go rename to utils/jobs/lock.go index 655b2605..9919b880 100644 --- a/jobs/lock.go +++ b/utils/jobs/lock.go @@ -2,7 +2,7 @@ package jobs import ( "fmt" - "go.dtapp.net/library/goredis" + "go.dtapp.net/library/utils/goredis" "time" ) diff --git a/jobs/model.go b/utils/jobs/model.go similarity index 100% rename from jobs/model.go rename to utils/jobs/model.go diff --git a/jobs/params.go b/utils/jobs/params.go similarity index 100% rename from jobs/params.go rename to utils/jobs/params.go diff --git a/jobs/type.go b/utils/jobs/type.go similarity index 100% rename from jobs/type.go rename to utils/jobs/type.go diff --git a/jobs/version.go b/utils/jobs/version.go similarity index 100% rename from jobs/version.go rename to utils/jobs/version.go diff --git a/phpjson/phpjson.go b/utils/phpjson/phpjson.go similarity index 100% rename from phpjson/phpjson.go rename to utils/phpjson/phpjson.go diff --git a/rmb/rmb.go b/utils/rmb/rmb.go similarity index 100% rename from rmb/rmb.go rename to utils/rmb/rmb.go diff --git a/tool/system/os.go b/utils/system/os.go similarity index 100% rename from tool/system/os.go rename to utils/system/os.go