diff --git a/README.md b/README.md index c77b158..e5f3c32 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # helays/utils -通用 Go 工具包集合 —— 一组实用、模块化的基础库,用于加速后端服务和工具类开发。模块以 `github.com/helays/utils/v2` 作为 module 前缀导入,包含文件/IO 工具、模板助手、HTTP 层辅助、文件存储驱动、数据库辅助、规则验证引擎、锁定策略、安全工具与日志封装等。 +通用 Go 工具包集合 —— 一组实用、模块化的基础库,用于加速后端服务和工具类开发。模块以 `helay.net/go/utils/v3` 作为 module 前缀导入,包含文件/IO 工具、模板助手、HTTP 层辅助、文件存储驱动、数据库辅助、规则验证引擎、锁定策略、安全工具与日志封装等。 --- @@ -9,16 +9,16 @@ 1. **安装(模块导入):** ```bash -go get github.com/helays/utils/v2 +go get helay.net/go/utils/v3 ``` 2. **典型导入示例:** ```go import ( - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/template/template_engine" - "github.com/helays/utils/v2/rule-engine/validator" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/template/template_engine" + "helay.net/go/utils/v3/rule-engine/validator" ) ``` @@ -51,7 +51,7 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 1. **tools — 通用辅助工具** - - 包路径:`github.com/helays/utils/v2/tools` + - 包路径:`helay.net/go/utils/v3/tools` - 功能:字符串与命名转换、文件读写、IO 辅助、map/切片工具、环形缓冲索引、深拷贝等。 @@ -63,7 +63,7 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 2. **net/http — HTTP 层工具与中间件** - - 包路径:`github.com/helays/utils/v2/net/http`(及其子包) + - 包路径:`helay.net/go/utils/v3/net/http`(及其子包) - 功能:统一响应(response)、路由处理、http server 支持、session、mime、route 中间件(日志/metrics)等。 @@ -74,7 +74,7 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 3. **template/template_engine — 模板内置函数** - - 包路径:`github.com/helays/utils/v2/template/template_engine` + - 包路径:`helay.net/go/utils/v3/template/template_engine` - 功能:为 `html/template` 提供内置函数(时间、格式化、链接生成、dict、循环等)。 @@ -86,9 +86,9 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 4. **file/filesaver & db/fileSaver — 文件存储抽象与驱动** - 包路径: - - 抽象:`github.com/helays/utils/v2/file/filesaver` - - 本地驱动:`github.com/helays/utils/v2/file/filesaver/localfile` - - MinIO 驱动:`github.com/helays/utils/v2/db/fileSaver/minio` + - 抽象:`helay.net/go/utils/v3/file/filesaver` + - 本地驱动:`helay.net/go/utils/v3/file/filesaver/localfile` + - MinIO 驱动:`helay.net/go/utils/v3/db/fileSaver/minio` - 功能:统一文件写入/读取/列举/删除接口,支持本地、FTP、SFTP、HDFS、MinIO 等后端。 @@ -97,7 +97,7 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 5. **db — 数据库辅助与查询构造器** - - 包路径:`github.com/helays/utils/v2/db`,查询构造器在 `db/query` + - 包路径:`helay.net/go/utils/v3/db`,查询构造器在 `db/query` - 功能:DSN 构建(MySQL/Postgres/SQLite)、查询构造器到 GORM clause 的转换、字段解析工具。 @@ -106,14 +106,14 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) 6. **db/localredis — 本地 Redis 适配(测试替代)** - - 包路径:`github.com/helays/utils/v2/db/localredis` + - 包路径:`helay.net/go/utils/v3/db/localredis` - 说明:提供本地实现以便在无 Redis 环境或测试中替代真实 redis 客户端。注意:部分方法为占位实现,生产使用前请确认完整性。 7. **rule-engine/validator — 规则验证引擎** - - 包路径:`github.com/helays/utils/v2/rule-engine/validator` + - 包路径:`helay.net/go/utils/v3/rule-engine/validator` - 功能:支持数据类型、长度、格式、内容与高级表达式验证;支持 AND/OR 逻辑组合、通配符字段、CEL/Go/JSONLogic 等表达式类型;内置中文错误提示。 @@ -126,26 +126,26 @@ msg, ok := rule.Validate(map[string]any{"age": 20}) - lockpolicy(锁定策略管理,session/ip/user,多层锁定与升级链) - cors(CORS 策略与预检处理) - - 包路径:`github.com/helays/utils/v2/security/...` + - 包路径:`helay.net/go/utils/v3/security/...` 9. **logger — 日志实现** - - 包路径:`github.com/helays/utils/v2/logger`(含 `ulogs`、`zaploger`) + - 包路径:`helay.net/go/utils/v3/logger`(含 `ulogs`、`zaploger`) - 功能:日志记录、文件滚动(结合 lumberjack)、HTTP 请求日志中间件等。 10. **crypto — 加密工具** - - 包路径:`github.com/helays/utils/v2/crypto/aes` + - 包路径:`helay.net/go/utils/v3/crypto/aes` - 功能:AES CBC 简单加解密(包含 padding/unpadding,适用于简单场景)。 11. **config — 配置与正则常量** - - 包路径:`github.com/helays/utils/v2/config` + - 包路径:`helay.net/go/utils/v3/config` - 功能:常用正则(手机号、邮箱、页面解析)、YAML 加载器(支持 include 机制)。 diff --git a/close/esClose/close.go b/close/esClose/close.go index 3cdcbd1..3fa76d4 100644 --- a/close/esClose/close.go +++ b/close/esClose/close.go @@ -2,7 +2,7 @@ package esClose import ( "github.com/elastic/go-elasticsearch/v8/esapi" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" ) // CloseResp 关闭esapi.Response diff --git a/close/gormClose/close.go b/close/gormClose/close.go index 97d9e38..30635fc 100644 --- a/close/gormClose/close.go +++ b/close/gormClose/close.go @@ -1,8 +1,8 @@ package gormClose import ( - "github.com/helays/utils/v2/close/vclose" "gorm.io/gorm" + "helay.net/go/utils/v3/close/vclose" ) func Close(db *gorm.DB) { diff --git a/close/kafkaClose/kafka.go b/close/kafkaClose/kafka.go index b099276..e096502 100644 --- a/close/kafkaClose/kafka.go +++ b/close/kafkaClose/kafka.go @@ -2,7 +2,7 @@ package kafkaClose import ( "github.com/IBM/sarama" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/logger/ulogs" ) // CloseKafkaPartition 关闭分区 diff --git a/close/test/clsoe.go b/close/test/clsoe.go index fad41f8..ca32899 100644 --- a/close/test/clsoe.go +++ b/close/test/clsoe.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" "os" ) diff --git a/cluster/etcd/electMaster/elect.master.go b/cluster/etcd/electMaster/elect.master.go index 945886a..4398d8d 100644 --- a/cluster/etcd/electMaster/elect.master.go +++ b/cluster/etcd/electMaster/elect.master.go @@ -2,10 +2,10 @@ package electMaster import ( "context" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/logger/ulogs" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/concurrency" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/logger/ulogs" "time" ) diff --git a/cluster/nacos/electMaster/elect.master.go b/cluster/nacos/electMaster/elect.master.go index 727b42a..5eb28d4 100644 --- a/cluster/nacos/electMaster/elect.master.go +++ b/cluster/nacos/electMaster/elect.master.go @@ -2,10 +2,10 @@ package electMaster import ( "fmt" - "github.com/helays/utils/v2/logger/ulogs" "github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client" "github.com/nacos-group/nacos-sdk-go/v2/model" "github.com/nacos-group/nacos-sdk-go/v2/vo" + "helay.net/go/utils/v3/logger/ulogs" "sort" "time" ) diff --git a/cluster/zookeeper/electMaster/elect.master.go b/cluster/zookeeper/electMaster/elect.master.go index 366a41c..b096537 100644 --- a/cluster/zookeeper/electMaster/elect.master.go +++ b/cluster/zookeeper/electMaster/elect.master.go @@ -3,8 +3,8 @@ package electMaster import ( "errors" "github.com/go-zookeeper/zk" - "github.com/helays/utils/v2/db/zookeeper" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/db/zookeeper" + "helay.net/go/utils/v3/logger/ulogs" "path" "sort" "strings" diff --git a/compress/zipkit/compress.go b/compress/zipkit/compress.go index 8cd2f7f..2b5e807 100644 --- a/compress/zipkit/compress.go +++ b/compress/zipkit/compress.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/close/vclose" ) // CompressFileToZip 将多个文件压缩为ZIP文件 diff --git a/config/cfg-proxy/proxy.go b/config/cfg-proxy/proxy.go index 7e6047e..811102f 100644 --- a/config/cfg-proxy/proxy.go +++ b/config/cfg-proxy/proxy.go @@ -6,9 +6,9 @@ import ( "net/url" "strings" - _ "github.com/helays/utils/v2/net/http/http-proxy" "github.com/pkg/errors" "golang.org/x/net/proxy" + _ "helay.net/go/utils/v3/net/http/http-proxy" ) type ProxyTypes string diff --git a/config/loadAuto/auto.go b/config/loadAuto/auto.go index d1f1fb9..9e42e3f 100644 --- a/config/loadAuto/auto.go +++ b/config/loadAuto/auto.go @@ -1,11 +1,11 @@ package loadAuto import ( - "github.com/helays/utils/v2/config" - loadIni2 "github.com/helays/utils/v2/config/loadIni" - loadJson2 "github.com/helays/utils/v2/config/loadJson" - "github.com/helays/utils/v2/config/loadYaml" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/config" + loadIni2 "helay.net/go/utils/v3/config/loadIni" + loadJson2 "helay.net/go/utils/v3/config/loadJson" + "helay.net/go/utils/v3/config/loadYaml" + "helay.net/go/utils/v3/logger/ulogs" "path/filepath" ) diff --git a/config/loadIni/load.go b/config/loadIni/load.go index e767ccb..fe86c79 100644 --- a/config/loadIni/load.go +++ b/config/loadIni/load.go @@ -1,10 +1,10 @@ package loadIni import ( - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" "gopkg.in/ini.v1" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" ) func LoadIni(i any) { diff --git a/config/loadJson/load.go b/config/loadJson/load.go index 0f8b39b..f78fcc8 100644 --- a/config/loadJson/load.go +++ b/config/loadJson/load.go @@ -3,10 +3,10 @@ package loadJson import ( "encoding/json" "fmt" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" "os" ) diff --git a/config/loadYaml/load.go b/config/loadYaml/load.go index 5144737..7ca8e35 100644 --- a/config/loadYaml/load.go +++ b/config/loadYaml/load.go @@ -6,12 +6,12 @@ import ( "os" "path/filepath" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/fileinclude" "gopkg.in/yaml.v3" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/fileinclude" ) func LoadYaml(i any) { diff --git a/config/parseCmd/parse.go b/config/parseCmd/parse.go index b01acc4..4576acb 100644 --- a/config/parseCmd/parse.go +++ b/config/parseCmd/parse.go @@ -5,9 +5,9 @@ import ( "fmt" "os" - "github.com/helays/utils/v2" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" ) // Parseparams 解析启动参数 diff --git a/crypto/rsa/Rsa.3Des.go b/crypto/rsa/Rsa.3Des.go index 866052e..210a6d3 100644 --- a/crypto/rsa/Rsa.3Des.go +++ b/crypto/rsa/Rsa.3Des.go @@ -8,8 +8,8 @@ import ( "crypto/x509" "encoding/pem" "errors" - "github.com/helays/utils/v2/crypto/sm4" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/crypto/sm4" + "helay.net/go/utils/v3/logger/ulogs" "io/ioutil" ) diff --git a/crypto/rsa/rsa.go b/crypto/rsa/rsa.go index 8c66edc..c80387c 100644 --- a/crypto/rsa/rsa.go +++ b/crypto/rsa/rsa.go @@ -9,8 +9,8 @@ import ( "encoding/pem" "errors" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/crypto/sha256" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/crypto/sha256" ) // RsaVerify 签名验证,用公钥进行验证 diff --git a/crypto/tls.config/tls.go b/crypto/tls.config/tls.go index dfd8f10..0b21387 100644 --- a/crypto/tls.config/tls.go +++ b/crypto/tls.config/tls.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type Config struct { diff --git a/crypto/xxhashkit/xxhash.go b/crypto/xxhashkit/xxhash.go index 5aad0dc..6d94e24 100644 --- a/crypto/xxhashkit/xxhash.go +++ b/crypto/xxhashkit/xxhash.go @@ -2,7 +2,7 @@ package xxhashkit import ( "github.com/cespare/xxhash/v2" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) func XXHashString(s string) string { diff --git a/dataType/bool.go b/dataType/bool.go index 274c044..902c555 100644 --- a/dataType/bool.go +++ b/dataType/bool.go @@ -4,10 +4,10 @@ import ( "database/sql/driver" "encoding/json" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) // Bool 注意当使用这个类型时,在定义模型时,默认值需要带上括号。不然pg数据库会报错。 diff --git a/dataType/common.go b/dataType/common.go index ee36cb3..dee2ff9 100644 --- a/dataType/common.go +++ b/dataType/common.go @@ -10,13 +10,13 @@ import ( "strconv" "strings" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" "golang.org/x/exp/constraints" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) func BlobDbDataType(db *gorm.DB, _ *schema.Field) string { diff --git a/dataType/content_type.go b/dataType/content_type.go index d6f094f..26ca029 100644 --- a/dataType/content_type.go +++ b/dataType/content_type.go @@ -6,9 +6,9 @@ import ( "net/http" "strings" - "github.com/helays/utils/v2/config" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" ) // ContentType 表示检测到的内容类型 diff --git a/dataType/date.go b/dataType/date.go index d57ddd8..094f0d4 100644 --- a/dataType/date.go +++ b/dataType/date.go @@ -6,11 +6,11 @@ import ( "strings" "time" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/rule-engine/formatter" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/rule-engine/formatter" + "helay.net/go/utils/v3/tools" ) type CustomDate struct { diff --git a/dataType/int.go b/dataType/int.go index e8155fe..99d5b7b 100644 --- a/dataType/int.go +++ b/dataType/int.go @@ -4,10 +4,10 @@ import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) type Byte byte diff --git a/dataType/intstring.go b/dataType/intstring.go index 445b598..062178c 100644 --- a/dataType/intstring.go +++ b/dataType/intstring.go @@ -9,11 +9,11 @@ import ( "strings" "sync" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" "golang.org/x/exp/constraints" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) type IntString[T constraints.Integer] struct { diff --git a/dataType/sessionval.go b/dataType/sessionval.go index 762b16f..a9f1a42 100644 --- a/dataType/sessionval.go +++ b/dataType/sessionval.go @@ -5,9 +5,9 @@ import ( "database/sql/driver" "encoding/gob" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/tools" ) func NewSessionValue(val any) SessionValue { diff --git a/dataType/string.go b/dataType/string.go index f17f3b7..7762320 100644 --- a/dataType/string.go +++ b/dataType/string.go @@ -5,9 +5,9 @@ import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/config" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" ) type String string diff --git a/dataType/timestamp.go b/dataType/timestamp.go index 9223e29..6e67a48 100644 --- a/dataType/timestamp.go +++ b/dataType/timestamp.go @@ -6,10 +6,10 @@ import ( "strings" "time" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/rule-engine/formatter" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/rule-engine/formatter" ) type Timestamp struct { diff --git a/db/dbErrors/errPostgres/err.go b/db/dbErrors/errPostgres/err.go index 85e9ed5..70e9b73 100644 --- a/db/dbErrors/errPostgres/err.go +++ b/db/dbErrors/errPostgres/err.go @@ -1,6 +1,6 @@ package errPostgres -import "github.com/helays/utils/v2/db/dbErrors" +import "helay.net/go/utils/v3/db/dbErrors" var PgErrorMap = map[string]dbErrors.DbError{ // Class 00 — Successful Completion diff --git a/db/dbErrors/errTools/tools.go b/db/dbErrors/errTools/tools.go index 18543c0..95a3ddc 100644 --- a/db/dbErrors/errTools/tools.go +++ b/db/dbErrors/errTools/tools.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" "github.com/go-sql-driver/mysql" - "github.com/helays/utils/v2/db/dbErrors" - "github.com/helays/utils/v2/db/dbErrors/errPostgres" "github.com/jackc/pgx/v5/pgconn" + "helay.net/go/utils/v3/db/dbErrors" + "helay.net/go/utils/v3/db/dbErrors/errPostgres" "strings" ) diff --git a/db/dsn.go b/db/dsn.go index dda06d4..15c4580 100644 --- a/db/dsn.go +++ b/db/dsn.go @@ -5,8 +5,8 @@ import ( "net/url" "strings" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) func (this *Dbbase) Dsn() string { diff --git a/db/elastic/create.go b/db/elastic/create.go index caf7839..da158bf 100644 --- a/db/elastic/create.go +++ b/db/elastic/create.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/elastic/go-elasticsearch/v8" "github.com/elastic/go-elasticsearch/v8/esutil" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" "log" "sync" "time" diff --git a/db/elastic/elastic.go b/db/elastic/elastic.go index e926ec0..9b342b3 100644 --- a/db/elastic/elastic.go +++ b/db/elastic/elastic.go @@ -4,10 +4,10 @@ import ( "context" "crypto/tls" "github.com/elastic/go-elasticsearch/v8" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/net/http/client/simpleHttpClient" - "github.com/helays/utils/v2/tools" "golang.org/x/net/proxy" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/net/http/client/simpleHttpClient" + "helay.net/go/utils/v3/tools" "net" "net/http" "net/url" diff --git a/db/elastic/elasticModel/scroll.go b/db/elastic/elasticModel/scroll.go index ddf07da..9beb33f 100644 --- a/db/elastic/elasticModel/scroll.go +++ b/db/elastic/elasticModel/scroll.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/elastic/go-elasticsearch/v8" "github.com/elastic/go-elasticsearch/v8/esapi" - "github.com/helays/utils/v2/close/esClose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/esClose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" "io" "time" ) diff --git a/db/elastic/ilm.policy.go b/db/elastic/ilm.policy.go index f51e5b6..0eae826 100644 --- a/db/elastic/ilm.policy.go +++ b/db/elastic/ilm.policy.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/elastic/go-elasticsearch/v8" "github.com/elastic/go-elasticsearch/v8/esapi" - "github.com/helays/utils/v2/close/esClose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/esClose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) type IlmPolicy struct { diff --git a/db/elastic/index.go b/db/elastic/index.go index 07045c0..0a73c44 100644 --- a/db/elastic/index.go +++ b/db/elastic/index.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/elastic/go-elasticsearch/v8" "github.com/elastic/go-elasticsearch/v8/esapi" - "github.com/helays/utils/v2/close/esClose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/esClose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/tools" ) type Index struct { diff --git a/db/etcd/etcd.client.go b/db/etcd/etcd.client.go index 427e435..b938d95 100644 --- a/db/etcd/etcd.client.go +++ b/db/etcd/etcd.client.go @@ -4,9 +4,9 @@ import ( "context" "time" - tlsconfig "github.com/helays/utils/v2/crypto/tls.config" - "github.com/helays/utils/v2/tools" "go.etcd.io/etcd/client/v3" + tlsconfig "helay.net/go/utils/v3/crypto/tls.config" + "helay.net/go/utils/v3/tools" ) type Config struct { diff --git a/db/exportkit/gormkit/all.go b/db/exportkit/gormkit/all.go index 1d66d2e..87ab4e9 100644 --- a/db/exportkit/gormkit/all.go +++ b/db/exportkit/gormkit/all.go @@ -3,9 +3,9 @@ package gormkit import ( "fmt" - "github.com/helays/utils/v2/db/exportkit" - "github.com/helays/utils/v2/tools" "github.com/xuri/excelize/v2" + "helay.net/go/utils/v3/db/exportkit" + "helay.net/go/utils/v3/tools" ) func (e *Export) all(et exportkit.ExportType, columns []string) error { diff --git a/db/exportkit/gormkit/batch.go b/db/exportkit/gormkit/batch.go index ee06981..e799202 100644 --- a/db/exportkit/gormkit/batch.go +++ b/db/exportkit/gormkit/batch.go @@ -3,10 +3,10 @@ package gormkit import ( "fmt" - "github.com/helays/utils/v2/db/exportkit" - "github.com/helays/utils/v2/tools" "github.com/xuri/excelize/v2" "gorm.io/gorm" + "helay.net/go/utils/v3/db/exportkit" + "helay.net/go/utils/v3/tools" ) func (e *Export) batch(et exportkit.ExportType, columns []string) error { diff --git a/db/exportkit/gormkit/cursor.go b/db/exportkit/gormkit/cursor.go index ffb1479..e41e4c2 100644 --- a/db/exportkit/gormkit/cursor.go +++ b/db/exportkit/gormkit/cursor.go @@ -4,9 +4,9 @@ import ( "database/sql" "fmt" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/db/exportkit" "github.com/xuri/excelize/v2" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/db/exportkit" ) func (e *Export) cursor(et exportkit.ExportType, columns []string) error { diff --git a/db/exportkit/gormkit/export.go b/db/exportkit/gormkit/export.go index 9304393..631255a 100644 --- a/db/exportkit/gormkit/export.go +++ b/db/exportkit/gormkit/export.go @@ -5,12 +5,12 @@ import ( "fmt" "io" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/db/exportkit" - "github.com/helays/utils/v2/excelTools" - "github.com/helays/utils/v2/tools" "github.com/xuri/excelize/v2" "gorm.io/gorm" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/db/exportkit" + "helay.net/go/utils/v3/excelTools" + "helay.net/go/utils/v3/tools" ) type Export struct { diff --git a/db/fileSaver/ftp/ftp.go b/db/fileSaver/ftp/ftp.go index d368c90..a9018c3 100644 --- a/db/fileSaver/ftp/ftp.go +++ b/db/fileSaver/ftp/ftp.go @@ -3,14 +3,14 @@ package ftp import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/close/ftpClose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/dataType/customWriter" - "github.com/helays/utils/v2/net/checkIp" "github.com/jlaffaye/ftp" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/close/ftpClose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/dataType/customWriter" + "helay.net/go/utils/v3/net/checkIp" "io" "path" ) diff --git a/db/fileSaver/hdfs/hdfs.go b/db/fileSaver/hdfs/hdfs.go index a4a4b52..26a0782 100644 --- a/db/fileSaver/hdfs/hdfs.go +++ b/db/fileSaver/hdfs/hdfs.go @@ -3,8 +3,8 @@ package hdfs import ( "fmt" "github.com/colinmarc/hdfs/v2" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/config" "io" "os" "path" diff --git a/db/fileSaver/local/local.go b/db/fileSaver/local/local.go index 4ab276d..1eece85 100644 --- a/db/fileSaver/local/local.go +++ b/db/fileSaver/local/local.go @@ -6,8 +6,8 @@ import ( "os" "path" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/tools" ) type Local struct{} diff --git a/db/fileSaver/minio/minio.go b/db/fileSaver/minio/minio.go index 47d82b4..0bbda53 100644 --- a/db/fileSaver/minio/minio.go +++ b/db/fileSaver/minio/minio.go @@ -3,9 +3,9 @@ package minio import ( "context" "fmt" - "github.com/helays/utils/v2/config" "github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7/pkg/credentials" + "helay.net/go/utils/v3/config" "io" "path" "strings" diff --git a/db/fileSaver/saver.go b/db/fileSaver/saver.go index 6ec84fa..806e93d 100644 --- a/db/fileSaver/saver.go +++ b/db/fileSaver/saver.go @@ -2,12 +2,12 @@ package fileSaver import ( "fmt" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/db/fileSaver/ftp" - "github.com/helays/utils/v2/db/fileSaver/hdfs" - "github.com/helays/utils/v2/db/fileSaver/local" - "github.com/helays/utils/v2/db/fileSaver/minio" - "github.com/helays/utils/v2/db/fileSaver/sftp" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/db/fileSaver/ftp" + "helay.net/go/utils/v3/db/fileSaver/hdfs" + "helay.net/go/utils/v3/db/fileSaver/local" + "helay.net/go/utils/v3/db/fileSaver/minio" + "helay.net/go/utils/v3/db/fileSaver/sftp" "io" "path" "strings" diff --git a/db/fileSaver/sftp/sftp.go b/db/fileSaver/sftp/sftp.go index f7cd0c8..f302fb6 100644 --- a/db/fileSaver/sftp/sftp.go +++ b/db/fileSaver/sftp/sftp.go @@ -3,14 +3,14 @@ package sftp import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/checkIp" "github.com/pkg/sftp" "golang.org/x/crypto/ssh" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/checkIp" "io" "path" ) diff --git a/db/inithelper.go b/db/inithelper.go index c5f82b3..f508cfa 100644 --- a/db/inithelper.go +++ b/db/inithelper.go @@ -2,12 +2,12 @@ package db import ( "fmt" - "github.com/helays/utils/v2/close/gormClose" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/close/gormClose" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/tools" "strings" "time" ) diff --git a/db/kafka/clientconf/config.go b/db/kafka/clientconf/config.go index 5672ecc..7e9af0c 100644 --- a/db/kafka/clientconf/config.go +++ b/db/kafka/clientconf/config.go @@ -5,10 +5,10 @@ import ( "time" "github.com/IBM/sarama" - cfg_proxy "github.com/helays/utils/v2/config/cfg-proxy" - "github.com/helays/utils/v2/scram" - "github.com/helays/utils/v2/tools" "github.com/rcrowley/go-metrics" + cfg_proxy "helay.net/go/utils/v3/config/cfg-proxy" + "helay.net/go/utils/v3/scram" + "helay.net/go/utils/v3/tools" ) // noinspection all diff --git a/db/kafka/clientconf/types.go b/db/kafka/clientconf/types.go index c36c33e..4722916 100644 --- a/db/kafka/clientconf/types.go +++ b/db/kafka/clientconf/types.go @@ -5,10 +5,10 @@ import ( "time" "github.com/IBM/sarama" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/tlsconfig" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/tlsconfig" ) type Retry struct { diff --git a/db/kafka/consumerGroupHandler.go b/db/kafka/consumerGroupHandler.go index 39d669a..e7d4a87 100644 --- a/db/kafka/consumerGroupHandler.go +++ b/db/kafka/consumerGroupHandler.go @@ -5,8 +5,8 @@ import ( "time" "github.com/IBM/sarama" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools/backoff" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools/backoff" ) // ConsumerGroupHander 消费者组处理器 diff --git a/db/kafka/consumerHandler.go b/db/kafka/consumerHandler.go index 313ee6c..d65849d 100644 --- a/db/kafka/consumerHandler.go +++ b/db/kafka/consumerHandler.go @@ -10,10 +10,10 @@ import ( "time" "github.com/IBM/sarama" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/backoff" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/backoff" ) type ConsumerConfig struct { diff --git a/db/kafka/kafka.go b/db/kafka/kafka.go index f577ad7..20ca570 100644 --- a/db/kafka/kafka.go +++ b/db/kafka/kafka.go @@ -4,8 +4,8 @@ import ( "time" "github.com/IBM/sarama" - "github.com/helays/utils/v2/scram" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/scram" + "helay.net/go/utils/v3/tools" ) // 设置 kafka diff --git a/db/kafka/struct.go b/db/kafka/struct.go index cc7da7a..bad0673 100644 --- a/db/kafka/struct.go +++ b/db/kafka/struct.go @@ -6,10 +6,10 @@ import ( "time" "github.com/IBM/sarama" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" ) // KafkaMessageTypeEnum diff --git a/db/nacos/client.go b/db/nacos/client.go index 9f392b4..3af7b42 100644 --- a/db/nacos/client.go +++ b/db/nacos/client.go @@ -3,11 +3,11 @@ package nacos import ( "time" - "github.com/helays/utils/v2/tools" "github.com/nacos-group/nacos-sdk-go/v2/clients" "github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client" "github.com/nacos-group/nacos-sdk-go/v2/common/constant" "github.com/nacos-group/nacos-sdk-go/v2/vo" + "helay.net/go/utils/v3/tools" ) type Config struct { diff --git a/db/postgres_struct.go b/db/postgres_struct.go index d2b59bf..5c51505 100644 --- a/db/postgres_struct.go +++ b/db/postgres_struct.go @@ -3,9 +3,9 @@ package db import ( "database/sql/driver" - "github.com/helays/utils/v2/dataType" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/dataType" ) type PostgresOpt struct { diff --git a/db/query/elastic.go b/db/query/elastic.go index 74ca3a6..1a8c3ac 100644 --- a/db/query/elastic.go +++ b/db/query/elastic.go @@ -3,7 +3,7 @@ package query import ( "strings" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) func (b *Builder) ToES() map[string]any { diff --git a/db/query/helper.go b/db/query/helper.go index d2123d4..4f06948 100644 --- a/db/query/helper.go +++ b/db/query/helper.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/helays/utils/v2/tools" "gorm.io/gorm/clause" + "helay.net/go/utils/v3/tools" ) // 辅助函数 diff --git a/db/redis/redis.go b/db/redis/redis.go index dc9e4b4..75ebe5a 100644 --- a/db/redis/redis.go +++ b/db/redis/redis.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" "github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9/maintnotifications" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" ) // 配置说明 diff --git a/db/socket/socket.go b/db/socket/socket.go index 47ee116..4abbcad 100644 --- a/db/socket/socket.go +++ b/db/socket/socket.go @@ -4,11 +4,11 @@ import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/checkIp" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/checkIp" ) type Config struct { diff --git a/db/struct.go b/db/struct.go index 072cd8f..1d97fbd 100644 --- a/db/struct.go +++ b/db/struct.go @@ -4,11 +4,11 @@ import ( "database/sql/driver" "time" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/logger/zaploger" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/logger/zaploger" ) var ( diff --git a/db/tableRotate/rotate.go b/db/tableRotate/rotate.go index 99d880e..087d5d7 100644 --- a/db/tableRotate/rotate.go +++ b/db/tableRotate/rotate.go @@ -8,15 +8,15 @@ import ( "time" "github.com/go-sql-driver/mysql" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/db/userDb" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/retention" "github.com/jackc/pgx/v5/pgconn" "github.com/robfig/cron/v3" "gorm.io/gorm" "gorm.io/gorm/clause" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/db/userDb" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/retention" ) const dateFormat = "20060102150405" diff --git a/db/tableRotate/tableSort.go b/db/tableRotate/tableSort.go index 25909ca..1bab076 100644 --- a/db/tableRotate/tableSort.go +++ b/db/tableRotate/tableSort.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" + "helay.net/go/utils/v3/tools" ) type tableSplit struct { diff --git a/db/userDb/connect/mysqlconnect/mysql.go b/db/userDb/connect/mysqlconnect/mysql.go index 1401315..59099ab 100644 --- a/db/userDb/connect/mysqlconnect/mysql.go +++ b/db/userDb/connect/mysqlconnect/mysql.go @@ -1,9 +1,9 @@ package mysqlconnect import ( - "github.com/helays/utils/v2/db" "gorm.io/driver/mysql" "gorm.io/gorm" + "helay.net/go/utils/v3/db" ) func InitDB(c *db.Dbbase) (*gorm.DB, error) { diff --git a/db/userDb/connect/postgresconnect/postgresql.go b/db/userDb/connect/postgresconnect/postgresql.go index 5fadb73..6b7312d 100644 --- a/db/userDb/connect/postgresconnect/postgresql.go +++ b/db/userDb/connect/postgresconnect/postgresql.go @@ -1,9 +1,9 @@ package postgresconnect import ( - "github.com/helays/utils/v2/db" "gorm.io/driver/postgres" "gorm.io/gorm" + "helay.net/go/utils/v3/db" ) func InitDB(c *db.Dbbase) (*gorm.DB, error) { diff --git a/db/userDb/connect/sqliteconnect/sqlite.go b/db/userDb/connect/sqliteconnect/sqlite.go index 590290e..5dcaf41 100644 --- a/db/userDb/connect/sqliteconnect/sqlite.go +++ b/db/userDb/connect/sqliteconnect/sqlite.go @@ -1,9 +1,9 @@ package sqliteconnect import ( - "github.com/helays/utils/v2/db" "gorm.io/driver/sqlite" "gorm.io/gorm" + "helay.net/go/utils/v3/db" ) func InitDB(c *db.Dbbase) (*gorm.DB, error) { diff --git a/db/userDb/curd.go b/db/userDb/curd.go index f9b919c..a70b13e 100644 --- a/db/userDb/curd.go +++ b/db/userDb/curd.go @@ -3,8 +3,8 @@ package userDb import ( "errors" "fmt" - "github.com/helays/utils/v2/db/dbErrors/errTools" "gorm.io/gorm" + "helay.net/go/utils/v3/db/dbErrors/errTools" "regexp" ) diff --git a/db/userDb/db.go b/db/userDb/db.go index e489fdb..5b554ba 100644 --- a/db/userDb/db.go +++ b/db/userDb/db.go @@ -9,10 +9,10 @@ import ( "strings" "time" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" "gorm.io/gorm/clause" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/tools" ) // diff --git a/db/userDb/dbUtils.go b/db/userDb/dbUtils.go index b3eb1bf..03e407d 100644 --- a/db/userDb/dbUtils.go +++ b/db/userDb/dbUtils.go @@ -4,13 +4,13 @@ import ( "fmt" "strings" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/db/dbErrors/errTools" - "github.com/helays/utils/v2/logger/ulogs" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/db/dbErrors/errTools" + "helay.net/go/utils/v3/logger/ulogs" ) var nullSqlConn map[string]*gorm.DB diff --git a/db/userDb/migrate.go b/db/userDb/migrate.go index 2b9ee87..ab9deea 100644 --- a/db/userDb/migrate.go +++ b/db/userDb/migrate.go @@ -4,11 +4,11 @@ import ( "reflect" "strings" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/db/tablename" - "github.com/helays/utils/v2/logger/ulogs" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/db/tablename" + "helay.net/go/utils/v3/logger/ulogs" ) // AutoMigrate 根据结构体自动创建表 diff --git a/db/userDb/modelfields.go b/db/userDb/modelfields.go index 7171e6d..c7b8b26 100644 --- a/db/userDb/modelfields.go +++ b/db/userDb/modelfields.go @@ -4,8 +4,8 @@ import ( "context" "reflect" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/tools" ) var modelFieldsCache = safe.NewMap[string, *modelFieldTypes](context.Background(), safe.StringHasher{}) diff --git a/db/zookeeper/client.go b/db/zookeeper/client.go index 1176a44..18c416c 100644 --- a/db/zookeeper/client.go +++ b/db/zookeeper/client.go @@ -3,14 +3,14 @@ package zookeeper import ( "errors" "fmt" - "github.com/helays/utils/v2/tools/backoff" + "helay.net/go/utils/v3/tools/backoff" "strings" "sync" "time" "github.com/go-zookeeper/zk" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" ) // Config Zookeeper客户端配置 diff --git a/file/filesaver/ftp/ftp.go b/file/filesaver/ftp/ftp.go index 3c7ea34..cfb3132 100644 --- a/file/filesaver/ftp/ftp.go +++ b/file/filesaver/ftp/ftp.go @@ -7,9 +7,9 @@ import ( "path/filepath" "strings" - "github.com/helays/utils/v2/close/ftpClose" - "github.com/helays/utils/v2/dataType/customWriter" "github.com/jlaffaye/ftp" + "helay.net/go/utils/v3/close/ftpClose" + "helay.net/go/utils/v3/dataType/customWriter" ) type Saver struct { diff --git a/file/filesaver/ftp/types.go b/file/filesaver/ftp/types.go index 9eb4ad5..f294e65 100644 --- a/file/filesaver/ftp/types.go +++ b/file/filesaver/ftp/types.go @@ -4,11 +4,11 @@ import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/checkIp" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/checkIp" ) // Config ftp 配置 diff --git a/file/filesaver/hdfs/hdfs.go b/file/filesaver/hdfs/hdfs.go index 7782192..81589d3 100644 --- a/file/filesaver/hdfs/hdfs.go +++ b/file/filesaver/hdfs/hdfs.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/colinmarc/hdfs/v2" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" ) type Saver struct { diff --git a/file/filesaver/hdfs/types.go b/file/filesaver/hdfs/types.go index 2fe46cc..2649ac7 100644 --- a/file/filesaver/hdfs/types.go +++ b/file/filesaver/hdfs/types.go @@ -3,7 +3,7 @@ package hdfs import ( "fmt" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) type Config struct { diff --git a/file/filesaver/localfile/local.go b/file/filesaver/localfile/local.go index d577cf1..0c93bb7 100644 --- a/file/filesaver/localfile/local.go +++ b/file/filesaver/localfile/local.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/tools" ) type Config struct { diff --git a/file/filesaver/minio/types.go b/file/filesaver/minio/types.go index fd99445..a842a1a 100644 --- a/file/filesaver/minio/types.go +++ b/file/filesaver/minio/types.go @@ -3,7 +3,7 @@ package minio import ( "fmt" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) type Config struct { diff --git a/file/filesaver/saver.go b/file/filesaver/saver.go index 075fca2..b7269f6 100644 --- a/file/filesaver/saver.go +++ b/file/filesaver/saver.go @@ -3,11 +3,11 @@ package filesaver import ( "fmt" - "github.com/helays/utils/v2/file/filesaver/ftp" - "github.com/helays/utils/v2/file/filesaver/hdfs" - "github.com/helays/utils/v2/file/filesaver/localfile" - "github.com/helays/utils/v2/file/filesaver/minio" - "github.com/helays/utils/v2/file/filesaver/sftp" + "helay.net/go/utils/v3/file/filesaver/ftp" + "helay.net/go/utils/v3/file/filesaver/hdfs" + "helay.net/go/utils/v3/file/filesaver/localfile" + "helay.net/go/utils/v3/file/filesaver/minio" + "helay.net/go/utils/v3/file/filesaver/sftp" ) func New(cfg *Config) (FileSaver, error) { diff --git a/file/filesaver/sftp/sftp.go b/file/filesaver/sftp/sftp.go index 83f09e0..6db46bd 100644 --- a/file/filesaver/sftp/sftp.go +++ b/file/filesaver/sftp/sftp.go @@ -6,9 +6,9 @@ import ( "os" "path/filepath" - "github.com/helays/utils/v2/close/vclose" "github.com/pkg/sftp" "golang.org/x/crypto/ssh" + "helay.net/go/utils/v3/close/vclose" ) type Saver struct { diff --git a/file/filesaver/sftp/types.go b/file/filesaver/sftp/types.go index 3d91b00..91b0f4f 100644 --- a/file/filesaver/sftp/types.go +++ b/file/filesaver/sftp/types.go @@ -4,11 +4,11 @@ import ( "database/sql/driver" "fmt" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/checkIp" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/checkIp" ) type Config struct { diff --git a/file/filesaver/types.go b/file/filesaver/types.go index 099c901..c029096 100644 --- a/file/filesaver/types.go +++ b/file/filesaver/types.go @@ -3,11 +3,11 @@ package filesaver import ( "io" - "github.com/helays/utils/v2/file/filesaver/ftp" - "github.com/helays/utils/v2/file/filesaver/hdfs" - "github.com/helays/utils/v2/file/filesaver/localfile" - "github.com/helays/utils/v2/file/filesaver/minio" - "github.com/helays/utils/v2/file/filesaver/sftp" + "helay.net/go/utils/v3/file/filesaver/ftp" + "helay.net/go/utils/v3/file/filesaver/hdfs" + "helay.net/go/utils/v3/file/filesaver/localfile" + "helay.net/go/utils/v3/file/filesaver/minio" + "helay.net/go/utils/v3/file/filesaver/sftp" ) type FileSaver interface { diff --git a/file/streamline/stream.go b/file/streamline/stream.go index 98515b4..3a8292c 100644 --- a/file/streamline/stream.go +++ b/file/streamline/stream.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" ) type StreamingLineRemover struct { diff --git a/go.mod b/go.mod index b250677..0773e7c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/helays/utils/v2 +module helay.net/go/utils/v3 go 1.24.0 diff --git a/init.go b/init.go index 68deae0..7e62a6c 100644 --- a/init.go +++ b/init.go @@ -6,7 +6,7 @@ import ( "path/filepath" "sync" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) var once sync.Once diff --git a/logger/loger/test/run.go b/logger/loger/test/run.go index 8ee1f0d..293c02a 100644 --- a/logger/loger/test/run.go +++ b/logger/loger/test/run.go @@ -1,9 +1,9 @@ package main import ( - "github.com/helays/utils/v2/config/loadIni" - "github.com/helays/utils/v2/config/parseCmd" - "github.com/helays/utils/v2/logger/loger" + "helay.net/go/utils/v3/config/loadIni" + "helay.net/go/utils/v3/config/parseCmd" + "helay.net/go/utils/v3/logger/loger" "strings" "time" ) diff --git a/logger/zaploger/log.go b/logger/zaploger/log.go index 8515b31..92d54d0 100644 --- a/logger/zaploger/log.go +++ b/logger/zaploger/log.go @@ -8,11 +8,11 @@ import ( "strings" "time" - "github.com/helays/utils/v2/tools" "github.com/natefinch/lumberjack" "go.uber.org/zap" "go.uber.org/zap/zapcore" "gorm.io/gorm/logger" + "helay.net/go/utils/v3/tools" ) // LogConfig defines the configuration for each log level. diff --git a/message/pubsub/etcdHander/etcdHander.go b/message/pubsub/etcdHander/etcdHander.go index 048d802..1777090 100644 --- a/message/pubsub/etcdHander/etcdHander.go +++ b/message/pubsub/etcdHander/etcdHander.go @@ -3,11 +3,11 @@ package etcdHander import ( "context" "fmt" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/message/pubsub" - "github.com/helays/utils/v2/tools" "go.etcd.io/etcd/client/v3" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/message/pubsub" + "helay.net/go/utils/v3/tools" ) type Instance struct { diff --git a/message/pubsub/kafkaHander/consumerGroup.go b/message/pubsub/kafkaHander/consumerGroup.go index c3b80c9..94496e6 100644 --- a/message/pubsub/kafkaHander/consumerGroup.go +++ b/message/pubsub/kafkaHander/consumerGroup.go @@ -2,7 +2,7 @@ package kafkaHander import ( "fmt" - "github.com/helays/utils/v2/message/pubsub" + "helay.net/go/utils/v3/message/pubsub" ) // 消费组模式,因特殊原因,这只能用相同的topic,根据不同的key来区分具体业务 diff --git a/message/pubsub/kafkaHander/consumerSingle.go b/message/pubsub/kafkaHander/consumerSingle.go index 125cec6..a8a1546 100644 --- a/message/pubsub/kafkaHander/consumerSingle.go +++ b/message/pubsub/kafkaHander/consumerSingle.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" "github.com/IBM/sarama" - "github.com/helays/utils/v2/message/pubsub" - "github.com/helays/utils/v2/tools/backoff" + "helay.net/go/utils/v3/message/pubsub" + "helay.net/go/utils/v3/tools/backoff" "strings" "time" ) diff --git a/message/pubsub/kafkaHander/kafkaHander.go b/message/pubsub/kafkaHander/kafkaHander.go index 7ac6697..8f3946f 100644 --- a/message/pubsub/kafkaHander/kafkaHander.go +++ b/message/pubsub/kafkaHander/kafkaHander.go @@ -4,10 +4,10 @@ import ( "context" "fmt" "github.com/IBM/sarama" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/message/pubsub" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/message/pubsub" + "helay.net/go/utils/v3/tools" "sync" ) diff --git a/message/pubsub/pubsub.go b/message/pubsub/pubsub.go index 164e6df..9563bb3 100644 --- a/message/pubsub/pubsub.go +++ b/message/pubsub/pubsub.go @@ -2,7 +2,7 @@ package pubsub import ( "context" - "github.com/helays/utils/v2/logger/zaploger" + "helay.net/go/utils/v3/logger/zaploger" "path" "strings" ) diff --git a/message/pubsub/redisHander/pubsub.go b/message/pubsub/redisHander/pubsub.go index 0d01681..5d93e6f 100644 --- a/message/pubsub/redisHander/pubsub.go +++ b/message/pubsub/redisHander/pubsub.go @@ -2,10 +2,10 @@ package redisHander import ( "context" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/message/pubsub" "github.com/redis/go-redis/v9" "go.uber.org/zap" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/message/pubsub" ) // Instance redis实例 diff --git a/net/email/email.go b/net/email/email.go index 385eb47..84e7ffa 100644 --- a/net/email/email.go +++ b/net/email/email.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/helays/gomail/v2" - cfg_proxy "github.com/helays/utils/v2/config/cfg-proxy" - cfg_tls "github.com/helays/utils/v2/config/cfg-tls" + cfg_proxy "helay.net/go/utils/v3/config/cfg-proxy" + cfg_tls "helay.net/go/utils/v3/config/cfg-tls" ) type EmailSender struct { diff --git a/net/http/client/httpClient/app.go b/net/http/client/httpClient/app.go index 1c1805c..1d1530b 100644 --- a/net/http/client/httpClient/app.go +++ b/net/http/client/httpClient/app.go @@ -6,11 +6,11 @@ import ( "context" "crypto/tls" "errors" - "github.com/helays/utils/v2/close/gzipClose" - "github.com/helays/utils/v2/close/httpClose" - "github.com/helays/utils/v2/net/http/httpkit" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/encodinghelper" + "helay.net/go/utils/v3/close/gzipClose" + "helay.net/go/utils/v3/close/httpClose" + "helay.net/go/utils/v3/net/http/httpkit" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/encodinghelper" "io" "net" "net/http" diff --git a/net/http/client/simpleHttpClient/client.go b/net/http/client/simpleHttpClient/client.go index 16b1fcd..fedaeea 100644 --- a/net/http/client/simpleHttpClient/client.go +++ b/net/http/client/simpleHttpClient/client.go @@ -7,8 +7,8 @@ import ( "net/http" "time" - cfg_proxy "github.com/helays/utils/v2/config/cfg-proxy" - "github.com/helays/utils/v2/safe" + cfg_proxy "helay.net/go/utils/v3/config/cfg-proxy" + "helay.net/go/utils/v3/safe" ) var cache = safe.NewMap[string, *http.Client](context.Background(), safe.StringHasher{}) diff --git a/net/http/client/simpleHttpClient/client.with.options.go b/net/http/client/simpleHttpClient/client.with.options.go index 202e145..5c6786a 100644 --- a/net/http/client/simpleHttpClient/client.with.options.go +++ b/net/http/client/simpleHttpClient/client.with.options.go @@ -9,8 +9,8 @@ import ( "net/url" "time" - "github.com/helays/utils/v2/tools" "golang.org/x/net/proxy" + "helay.net/go/utils/v3/tools" ) const ( diff --git a/net/http/cookiekit/types.go b/net/http/cookiekit/types.go index e0ad892..e50ac42 100644 --- a/net/http/cookiekit/types.go +++ b/net/http/cookiekit/types.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type Config struct { diff --git a/net/http/http-proxy/proxy.go b/net/http/http-proxy/proxy.go index 3bc13b9..52f66e9 100644 --- a/net/http/http-proxy/proxy.go +++ b/net/http/http-proxy/proxy.go @@ -10,8 +10,8 @@ import ( "strings" "sync" - "github.com/helays/utils/v2/close/vclose" "golang.org/x/net/proxy" + "helay.net/go/utils/v3/close/vclose" ) var once sync.Once diff --git a/net/http/httpExport/httpExportExcel/export.go b/net/http/httpExport/httpExportExcel/export.go index 03b4f5d..d8be16f 100644 --- a/net/http/httpExport/httpExportExcel/export.go +++ b/net/http/httpExport/httpExportExcel/export.go @@ -3,11 +3,11 @@ package httpExportExcel import ( "net/http" - "github.com/helays/utils/v2/db/exportkit" - "github.com/helays/utils/v2/db/exportkit/gormkit" - "github.com/helays/utils/v2/net/http/httpkit" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" + "helay.net/go/utils/v3/db/exportkit" + "helay.net/go/utils/v3/db/exportkit/gormkit" + "helay.net/go/utils/v3/net/http/httpkit" + "helay.net/go/utils/v3/tools" ) // diff --git a/net/http/httpExport/httpExportExcel/exportByElastic.go b/net/http/httpExport/httpExportExcel/exportByElastic.go index 0595c73..034441e 100644 --- a/net/http/httpExport/httpExportExcel/exportByElastic.go +++ b/net/http/httpExport/httpExportExcel/exportByElastic.go @@ -8,13 +8,13 @@ import ( "strings" "time" - "github.com/helays/utils/v2/db/elastic/elasticModel" + "helay.net/go/utils/v3/db/elastic/elasticModel" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/excelTools" - "github.com/helays/utils/v2/net/http/httpkit" - "github.com/helays/utils/v2/tools" "github.com/xuri/excelize/v2" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/excelTools" + "helay.net/go/utils/v3/net/http/httpkit" + "helay.net/go/utils/v3/tools" ) // ElasticsearchExport 用于导出Elasticsearch数据的结构体 diff --git a/net/http/httpServer/f_middleware.go b/net/http/httpServer/f_middleware.go index 21c09df..0844df7 100644 --- a/net/http/httpServer/f_middleware.go +++ b/net/http/httpServer/f_middleware.go @@ -4,10 +4,10 @@ import ( "net/http" "strings" - "github.com/helays/utils/v2/close/httpClose" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/net/http/server" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/close/httpClose" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/net/http/server" ) // MiddlewareFunc 修改为支持 http.Handler diff --git a/net/http/httpServer/f_router.go b/net/http/httpServer/f_router.go index 5feebb3..3d64178 100644 --- a/net/http/httpServer/f_router.go +++ b/net/http/httpServer/f_router.go @@ -5,9 +5,9 @@ import ( "net/http/pprof" "time" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/httpServer/router" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/httpServer/router" ) // 设置路由 diff --git a/net/http/httpServer/f_validate.go b/net/http/httpServer/f_validate.go index 4a12be0..8b94479 100644 --- a/net/http/httpServer/f_validate.go +++ b/net/http/httpServer/f_validate.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "github.com/helays/utils/v2/net/http/request" + "helay.net/go/utils/v3/net/http/request" ) // 默认验证中间件 diff --git a/net/http/httpServer/http.server.go b/net/http/httpServer/http.server.go index 4267797..181a491 100644 --- a/net/http/httpServer/http.server.go +++ b/net/http/httpServer/http.server.go @@ -12,16 +12,16 @@ import ( "time" "github.com/gorilla/handlers" - "github.com/helays/utils/v2/close/httpClose" - "github.com/helays/utils/v2/crypto/xxhashkit" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/mime" - "github.com/helays/utils/v2/net/http/route/middleware" - "github.com/helays/utils/v2/net/ipkit" - "github.com/helays/utils/v2/net/ipmatch" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/tools" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/close/httpClose" + "helay.net/go/utils/v3/crypto/xxhashkit" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/mime" + "helay.net/go/utils/v3/net/http/route/middleware" + "helay.net/go/utils/v3/net/ipkit" + "helay.net/go/utils/v3/net/ipmatch" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/tools" ) // HttpServerStart 公功 http server 启动函数 diff --git a/net/http/httpServer/router/action_default.go b/net/http/httpServer/router/action_default.go index cee58b9..7061606 100644 --- a/net/http/httpServer/router/action_default.go +++ b/net/http/httpServer/router/action_default.go @@ -11,15 +11,15 @@ import ( "time" "github.com/dchest/captcha" - "github.com/helays/utils/v2" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/mime" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/net/http/session" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/mime" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/net/http/session" + "helay.net/go/utils/v3/tools" ) // diff --git a/net/http/httpServer/router/action_play.go b/net/http/httpServer/router/action_play.go index 0ff3da9..294287c 100644 --- a/net/http/httpServer/router/action_play.go +++ b/net/http/httpServer/router/action_play.go @@ -4,10 +4,10 @@ import ( "net/http" "path/filepath" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/net/http/httpkit" - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/net/http/httpkit" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/tools" ) // diff --git a/net/http/httpServer/router/action_utils.go b/net/http/httpServer/router/action_utils.go index 1bca1f0..7335370 100644 --- a/net/http/httpServer/router/action_utils.go +++ b/net/http/httpServer/router/action_utils.go @@ -4,11 +4,11 @@ import ( "net/http" "regexp" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/net/http/route" "github.com/pkg/errors" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/net/http/route" ) // diff --git a/net/http/httpServer/router/deprecated_action_before.go b/net/http/httpServer/router/deprecated_action_before.go index cce1f35..46cca56 100644 --- a/net/http/httpServer/router/deprecated_action_before.go +++ b/net/http/httpServer/router/deprecated_action_before.go @@ -4,9 +4,9 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/net/http/session" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/net/http/session" ) // BeforeAction 所有应用前置操作 diff --git a/net/http/httpServer/router/deprecated_action_cookie.go b/net/http/httpServer/router/deprecated_action_cookie.go index 3074c28..0544b0b 100644 --- a/net/http/httpServer/router/deprecated_action_cookie.go +++ b/net/http/httpServer/router/deprecated_action_cookie.go @@ -4,10 +4,10 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) -// Deprecated: 请使用 github.com/helays/utils/v2/net/http/cookiekit.SetCookie +// Deprecated: 请使用 helay.net/go/utils/v3/net/http/cookiekit.SetCookie func (ro *Router) SetCookie(w http.ResponseWriter, k, value, path string) { path = tools.Ternary(path == "", "/", path) cookie := http.Cookie{ @@ -27,7 +27,7 @@ func (ro *Router) SetCookie(w http.ResponseWriter, k, value, path string) { http.SetCookie(w, &cookie) } -// Deprecated: 请使用 github.com/helays/utils/v2/net/http/cookiekit.DelCookie +// Deprecated: 请使用 helay.net/go/utils/v3/net/http/cookiekit.DelCookie func (ro *Router) DelCookie(w http.ResponseWriter, k, path string) { cookie := http.Cookie{ diff --git a/net/http/httpServer/router/struct.go b/net/http/httpServer/router/struct.go index 48c0abd..d2c99b0 100644 --- a/net/http/httpServer/router/struct.go +++ b/net/http/httpServer/router/struct.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/net/http/session" "gorm.io/gorm" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/net/http/session" ) type LoginInfo struct { diff --git a/net/http/httpServer/struct.go b/net/http/httpServer/struct.go index 4b66495..4f37701 100644 --- a/net/http/httpServer/struct.go +++ b/net/http/httpServer/struct.go @@ -4,12 +4,12 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/net/http/route/middleware" - "github.com/helays/utils/v2/net/ipmatch" - "github.com/helays/utils/v2/security/cors" - "github.com/helays/utils/v2/security/cors/cors_std" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/net/http/route/middleware" + "helay.net/go/utils/v3/net/ipmatch" + "helay.net/go/utils/v3/security/cors" + "helay.net/go/utils/v3/security/cors/cors_std" ) type HttpServer struct { diff --git a/net/http/httpfile/nfs.go b/net/http/httpfile/nfs.go index bbc5718..dedc997 100644 --- a/net/http/httpfile/nfs.go +++ b/net/http/httpfile/nfs.go @@ -4,7 +4,7 @@ import ( "net/http" "os" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" ) // NoSymlinkFileSystem 禁用符号链接的文件系统包装器 diff --git a/net/http/httpkit/http.tools.go b/net/http/httpkit/http.tools.go index 1889685..356c380 100644 --- a/net/http/httpkit/http.tools.go +++ b/net/http/httpkit/http.tools.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // QueryGetSlice 获取query参数,并分割 diff --git a/net/http/mime/func.go b/net/http/mime/func.go index f8731db..a34c6fa 100644 --- a/net/http/mime/func.go +++ b/net/http/mime/func.go @@ -3,7 +3,7 @@ package mime import ( "bytes" "fmt" - "github.com/helays/utils/v2/close/osClose" + "helay.net/go/utils/v3/close/osClose" "io" "net/http" "os" diff --git a/net/http/request/decode.go b/net/http/request/decode.go index 0bab01b..739c060 100644 --- a/net/http/request/decode.go +++ b/net/http/request/decode.go @@ -12,9 +12,9 @@ import ( "github.com/go-playground/form/v4" "github.com/gorilla/schema" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/decode/json_decode_tee" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/decode/json_decode_tee" ) // QueryDecode 解析query数据 diff --git a/net/http/request/req.go b/net/http/request/req.go index e40b479..81d61e9 100644 --- a/net/http/request/req.go +++ b/net/http/request/req.go @@ -5,7 +5,7 @@ import ( "net/http" "net/url" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // GetHeaderValueFormatInt 获取多个header字段,并转为int diff --git a/net/http/response/dbresponse/f_delete.go b/net/http/response/dbresponse/f_delete.go index 8e19b5e..cd89691 100644 --- a/net/http/response/dbresponse/f_delete.go +++ b/net/http/response/dbresponse/f_delete.go @@ -3,9 +3,9 @@ package dbresponse import ( "net/http" - "github.com/helays/utils/v2/db/userDb" - "github.com/helays/utils/v2/net/http/response" "gorm.io/gorm" + "helay.net/go/utils/v3/db/userDb" + "helay.net/go/utils/v3/net/http/response" ) // ModelDelete 执行模型删除操作。 diff --git a/net/http/response/dbresponse/f_resplist.go b/net/http/response/dbresponse/f_resplist.go index b8c3c70..122f8e8 100644 --- a/net/http/response/dbresponse/f_resplist.go +++ b/net/http/response/dbresponse/f_resplist.go @@ -5,12 +5,12 @@ import ( "net/http" "strings" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/db/userDb" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/tools" "gorm.io/gorm" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/db/userDb" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/tools" ) const ( diff --git a/net/http/response/dbresponse/resp-stream.go b/net/http/response/dbresponse/resp-stream.go index 1860e19..93c0371 100644 --- a/net/http/response/dbresponse/resp-stream.go +++ b/net/http/response/dbresponse/resp-stream.go @@ -5,10 +5,10 @@ import ( "encoding/json" "net/http" - "github.com/helays/utils/v2/close/sqlClose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/response" "gorm.io/gorm" + "helay.net/go/utils/v3/close/sqlClose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/response" ) type Stream[T any] struct { diff --git a/net/http/response/decode.go b/net/http/response/decode.go index 875f30c..5cc5555 100644 --- a/net/http/response/decode.go +++ b/net/http/response/decode.go @@ -4,8 +4,8 @@ import ( "fmt" "net/http" - "github.com/helays/utils/v2/net/http/request" - "github.com/helays/utils/v2/tools/decode/json_decode_tee" + "helay.net/go/utils/v3/net/http/request" + "helay.net/go/utils/v3/tools/decode/json_decode_tee" ) func JsonDecodeResp[T any](w http.ResponseWriter, r *http.Request) (T, bool) { diff --git a/net/http/response/deprecated.go b/net/http/response/deprecated.go index 6a4a351..206879d 100644 --- a/net/http/response/deprecated.go +++ b/net/http/response/deprecated.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/httpkit" - mime2 "github.com/helays/utils/v2/net/http/mime" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/httpkit" + mime2 "helay.net/go/utils/v3/net/http/mime" ) // Play 公共函数文件 diff --git a/net/http/response/resp.go b/net/http/response/resp.go index e02f9d9..ea2ee87 100644 --- a/net/http/response/resp.go +++ b/net/http/response/resp.go @@ -13,12 +13,12 @@ import ( "regexp" "strconv" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/dataType/customWriter" - "github.com/helays/utils/v2/net/http/httpkit" - mime2 "github.com/helays/utils/v2/net/http/mime" - "github.com/helays/utils/v2/net/http/request" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/dataType/customWriter" + "helay.net/go/utils/v3/net/http/httpkit" + mime2 "helay.net/go/utils/v3/net/http/mime" + "helay.net/go/utils/v3/net/http/request" + "helay.net/go/utils/v3/tools" ) func ReqError(r *http.Request, i ...any) { diff --git a/net/http/response/response_code.go b/net/http/response/response_code.go index 195f1a5..56203dd 100644 --- a/net/http/response/response_code.go +++ b/net/http/response/response_code.go @@ -4,8 +4,8 @@ import ( "encoding/json" "net/http" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/request" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/request" ) type RespCode interface { diff --git a/net/http/route/captcha/captcha.go b/net/http/route/captcha/captcha.go index 77c3b05..84eee61 100644 --- a/net/http/route/captcha/captcha.go +++ b/net/http/route/captcha/captcha.go @@ -3,7 +3,7 @@ package captcha import ( "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type Captcha struct { diff --git a/net/http/route/captcha/text.go b/net/http/route/captcha/text.go index d0739ac..eccb27e 100644 --- a/net/http/route/captcha/text.go +++ b/net/http/route/captcha/text.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dchest/captcha" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/net/http/session" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/net/http/session" ) // Text 文字验证码 diff --git a/net/http/route/file.go b/net/http/route/file.go index 0366623..b7f8d21 100644 --- a/net/http/route/file.go +++ b/net/http/route/file.go @@ -9,12 +9,12 @@ import ( "strings" "time" - "github.com/helays/utils/v2" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/net/http/httpkit" - "github.com/helays/utils/v2/net/http/mime" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/net/http/httpkit" + "helay.net/go/utils/v3/net/http/mime" + "helay.net/go/utils/v3/tools" ) // HttpFS 获取文件 diff --git a/net/http/route/middleware/compress.go b/net/http/route/middleware/compress.go index 6b86d6e..c4a0416 100644 --- a/net/http/route/middleware/compress.go +++ b/net/http/route/middleware/compress.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/logger/zaploger" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/logger/zaploger" ) type CompressionConfig struct { diff --git a/net/http/route/middleware/ipaccess.go b/net/http/route/middleware/ipaccess.go index e79efaf..e172aa2 100644 --- a/net/http/route/middleware/ipaccess.go +++ b/net/http/route/middleware/ipaccess.go @@ -4,8 +4,8 @@ import ( "net" "net/http" - "github.com/helays/utils/v2/net/http/request" - "github.com/helays/utils/v2/net/ipmatch" + "helay.net/go/utils/v3/net/http/request" + "helay.net/go/utils/v3/net/ipmatch" ) type IPAccessMiddleware struct { diff --git a/net/http/route/middleware/logger.go b/net/http/route/middleware/logger.go index 6d4ccd5..4b37be5 100644 --- a/net/http/route/middleware/logger.go +++ b/net/http/route/middleware/logger.go @@ -5,10 +5,10 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/net/http/request" "go.uber.org/zap" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/net/http/request" ) func (c *ResponseProcessor) metrics(w *writer) { diff --git a/net/http/route/middleware/routecache/route.go b/net/http/route/middleware/routecache/route.go index b546e74..d9a0162 100644 --- a/net/http/route/middleware/routecache/route.go +++ b/net/http/route/middleware/routecache/route.go @@ -1,9 +1,9 @@ package routecache import ( - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/net/http/route/middleware/routecache/tree" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/net/http/route/middleware/routecache/tree" + "helay.net/go/utils/v3/tools" ) // AddRoute 添加路由 diff --git a/net/http/route/middleware/routecache/routecache_std/std.go b/net/http/route/middleware/routecache/routecache_std/std.go index 5de7a29..99993f0 100644 --- a/net/http/route/middleware/routecache/routecache_std/std.go +++ b/net/http/route/middleware/routecache/routecache_std/std.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/helays/utils/v2/net/http/route/middleware/routecache" + "helay.net/go/utils/v3/net/http/route/middleware/routecache" ) type STD[T comparable] struct { diff --git a/net/http/route/middleware/routecache/tree/radix_tree.go b/net/http/route/middleware/routecache/tree/radix_tree.go index 4f7605c..3864315 100644 --- a/net/http/route/middleware/routecache/tree/radix_tree.go +++ b/net/http/route/middleware/routecache/tree/radix_tree.go @@ -13,7 +13,7 @@ import ( "unicode" "unicode/utf8" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) const maxParamCount = ^uint8(0) diff --git a/net/http/route/middleware/routecache/tree/route_tree.go b/net/http/route/middleware/routecache/tree/route_tree.go index 1e27378..596973d 100644 --- a/net/http/route/middleware/routecache/tree/route_tree.go +++ b/net/http/route/middleware/routecache/tree/route_tree.go @@ -12,7 +12,7 @@ import ( "strconv" "strings" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type methodTyp uint diff --git a/net/http/route/middleware/routecache/types.go b/net/http/route/middleware/routecache/types.go index d6a7c7d..cc5c85d 100644 --- a/net/http/route/middleware/routecache/types.go +++ b/net/http/route/middleware/routecache/types.go @@ -3,7 +3,7 @@ package routecache import ( "sync" - "github.com/helays/utils/v2/net/http/route/middleware/routecache/tree" + "helay.net/go/utils/v3/net/http/route/middleware/routecache/tree" ) type RouteCache[T comparable] struct { diff --git a/net/http/route/route.go b/net/http/route/route.go index 99ed1ac..87fc950 100644 --- a/net/http/route/route.go +++ b/net/http/route/route.go @@ -1,7 +1,7 @@ package route import ( - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type Route struct { diff --git a/net/http/route/types.go b/net/http/route/types.go index 3b6c319..f97721a 100644 --- a/net/http/route/types.go +++ b/net/http/route/types.go @@ -4,9 +4,9 @@ import ( "database/sql/driver" "embed" - "github.com/helays/utils/v2/dataType" "gorm.io/gorm" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/dataType" ) // noinspection all diff --git a/net/http/server/middleware.go b/net/http/server/middleware.go index f581dee..5d1c0ca 100644 --- a/net/http/server/middleware.go +++ b/net/http/server/middleware.go @@ -5,11 +5,11 @@ import ( "fmt" "net/http" - "github.com/helays/utils/v2/close/httpClose" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/security/cors/cors_std" - "github.com/helays/utils/v2/tools" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/close/httpClose" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/security/cors/cors_std" + "helay.net/go/utils/v3/tools" ) // Chain 中间件链(兼容 http.Handler) diff --git a/net/http/server/server.go b/net/http/server/server.go index dd7912a..77f2126 100644 --- a/net/http/server/server.go +++ b/net/http/server/server.go @@ -9,15 +9,15 @@ import ( "strings" "time" - "github.com/helays/utils/v2/close/httpClose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/mime" - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/net/http/route/middleware" - "github.com/helays/utils/v2/net/ipmatch" - "github.com/helays/utils/v2/tools" "github.com/quic-go/quic-go" quicHttp3 "github.com/quic-go/quic-go/http3" + "helay.net/go/utils/v3/close/httpClose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/mime" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/net/http/route/middleware" + "helay.net/go/utils/v3/net/ipmatch" + "helay.net/go/utils/v3/tools" ) // noinspection all diff --git a/net/http/server/setroutes.go b/net/http/server/setroutes.go index e5fe92c..5ebbb25 100644 --- a/net/http/server/setroutes.go +++ b/net/http/server/setroutes.go @@ -6,11 +6,11 @@ import ( "net/http/pprof" "time" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/route/middleware" - "github.com/helays/utils/v2/tools" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/route/middleware" + "helay.net/go/utils/v3/tools" ) func (s *Server[T]) setRoutes() { diff --git a/net/http/server/types.go b/net/http/server/types.go index d522d3b..9450913 100644 --- a/net/http/server/types.go +++ b/net/http/server/types.go @@ -4,14 +4,14 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/logger/zaploger" - "github.com/helays/utils/v2/net/http/route" - "github.com/helays/utils/v2/net/http/route/middleware" - "github.com/helays/utils/v2/net/ipmatch" - "github.com/helays/utils/v2/net/tlsconfig" - "github.com/helays/utils/v2/security/cors" quicHttp3 "github.com/quic-go/quic-go/http3" "golang.org/x/net/websocket" + "helay.net/go/utils/v3/logger/zaploger" + "helay.net/go/utils/v3/net/http/route" + "helay.net/go/utils/v3/net/http/route/middleware" + "helay.net/go/utils/v3/net/ipmatch" + "helay.net/go/utils/v3/net/tlsconfig" + "helay.net/go/utils/v3/security/cors" ) const Version = "vs/2.1" diff --git a/net/http/session/adapter/gin_adapter/adapter.go b/net/http/session/adapter/gin_adapter/adapter.go index ccc7cfc..166fbd7 100644 --- a/net/http/session/adapter/gin_adapter/adapter.go +++ b/net/http/session/adapter/gin_adapter/adapter.go @@ -4,7 +4,7 @@ import ( "time" "github.com/gin-gonic/gin" - "github.com/helays/utils/v2/net/http/session" + "helay.net/go/utils/v3/net/http/session" ) type GinManager struct { diff --git a/net/http/session/config.go b/net/http/session/config.go index 1ec0cac..4ebecf3 100644 --- a/net/http/session/config.go +++ b/net/http/session/config.go @@ -3,7 +3,7 @@ package session import ( "time" - "github.com/helays/utils/v2/net/http/cookiekit" + "helay.net/go/utils/v3/net/http/cookiekit" ) // Options session 配置 diff --git a/net/http/session/manager.go b/net/http/session/manager.go index 18717ee..1645354 100644 --- a/net/http/session/manager.go +++ b/net/http/session/manager.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" ) const ( diff --git a/net/http/session/middleware.go b/net/http/session/middleware.go index 09645d2..a3d8fdb 100644 --- a/net/http/session/middleware.go +++ b/net/http/session/middleware.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/logger/ulogs" ) // Middleware session 中间件 diff --git a/net/http/session/standard_manager.go b/net/http/session/standard_manager.go index 2f502fc..3afbb4a 100644 --- a/net/http/session/standard_manager.go +++ b/net/http/session/standard_manager.go @@ -7,9 +7,9 @@ import ( "regexp" "time" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/net/http/cookiekit" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/net/http/cookiekit" + "helay.net/go/utils/v3/tools" ) // c0449773432e4a478d157a8a923199ac diff --git a/net/http/session/storage/carrier_file/file.go b/net/http/session/storage/carrier_file/file.go index a1a37c4..eb134df 100644 --- a/net/http/session/storage/carrier_file/file.go +++ b/net/http/session/storage/carrier_file/file.go @@ -8,10 +8,10 @@ import ( "path/filepath" "time" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/session" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/session" + "helay.net/go/utils/v3/tools" ) type Instance struct { diff --git a/net/http/session/storage/carrier_memory/memory.go b/net/http/session/storage/carrier_memory/memory.go index f1c7a42..0511851 100644 --- a/net/http/session/storage/carrier_memory/memory.go +++ b/net/http/session/storage/carrier_memory/memory.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/helays/utils/v2/net/http/session" - "github.com/helays/utils/v2/safe" + "helay.net/go/utils/v3/net/http/session" + "helay.net/go/utils/v3/safe" ) type Instance struct { diff --git a/net/http/session/storage/carrier_rdbms/rdbms.go b/net/http/session/storage/carrier_rdbms/rdbms.go index fc0adbd..a0ee310 100644 --- a/net/http/session/storage/carrier_rdbms/rdbms.go +++ b/net/http/session/storage/carrier_rdbms/rdbms.go @@ -4,10 +4,10 @@ import ( "context" "time" - "github.com/helays/utils/v2/db/userDb" - "github.com/helays/utils/v2/net/http/session" "gorm.io/gorm" "gorm.io/gorm/clause" + "helay.net/go/utils/v3/db/userDb" + "helay.net/go/utils/v3/net/http/session" ) type Instance struct { diff --git a/net/http/session/storage/carrier_redis/redis.go b/net/http/session/storage/carrier_redis/redis.go index e0a90a2..164662c 100644 --- a/net/http/session/storage/carrier_redis/redis.go +++ b/net/http/session/storage/carrier_redis/redis.go @@ -5,9 +5,9 @@ import ( "context" "encoding/gob" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/net/http/session" "github.com/redis/go-redis/v9" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/net/http/session" ) type Instance struct { diff --git a/net/http/session/types.go b/net/http/session/types.go index a42f674..7f3e678 100644 --- a/net/http/session/types.go +++ b/net/http/session/types.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "github.com/helays/utils/v2/dataType" + "helay.net/go/utils/v3/dataType" ) // 这个需要移除 上级Session 已经实现了二进制序列化 diff --git a/net/ipmatch/build.go b/net/ipmatch/build.go index d5184b3..58a2ac3 100644 --- a/net/ipmatch/build.go +++ b/net/ipmatch/build.go @@ -11,12 +11,12 @@ import ( "strings" "time" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/net/ipkit" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/tools" "github.com/malfunkt/iprange" "go4.org/netipx" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/net/ipkit" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/tools" ) // 构建过程: diff --git a/net/ipmatch/match.go b/net/ipmatch/match.go index d111c5e..50b457b 100644 --- a/net/ipmatch/match.go +++ b/net/ipmatch/match.go @@ -3,7 +3,7 @@ package ipmatch import ( "net/netip" - "github.com/helays/utils/v2/net/ipkit" + "helay.net/go/utils/v3/net/ipkit" ) func (m *IPMatcher) Contains(ip string) bool { diff --git a/net/ipmatch/optimizeIPv4.go b/net/ipmatch/optimizeIPv4.go index d81d0fd..b4dd070 100644 --- a/net/ipmatch/optimizeIPv4.go +++ b/net/ipmatch/optimizeIPv4.go @@ -3,7 +3,7 @@ package ipmatch import ( "sort" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) func (m *IPMatcher) optimizeIPv4Storage(ranges []ipv4Range) { diff --git a/net/ipmatch/optimizeIPv6.go b/net/ipmatch/optimizeIPv6.go index ffa2225..0023f88 100644 --- a/net/ipmatch/optimizeIPv6.go +++ b/net/ipmatch/optimizeIPv6.go @@ -5,7 +5,7 @@ import ( "net/netip" "sort" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // optimizeIPv6Storage 优化IPv6存储 diff --git a/net/ipmatch/types.go b/net/ipmatch/types.go index ca15469..4aa0ddd 100644 --- a/net/ipmatch/types.go +++ b/net/ipmatch/types.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/helays/utils/v2/safe" + "helay.net/go/utils/v3/safe" ) // IPVersion IP版本类型 diff --git a/net/tlsconfig/tls.go b/net/tlsconfig/tls.go index d121c8f..03ebf10 100644 --- a/net/tlsconfig/tls.go +++ b/net/tlsconfig/tls.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) var CurvePreferencesMap = map[string]tls.CurveID{ diff --git a/rand/crypto_rand/func.go b/rand/crypto_rand/func.go index 2701c47..bde5920 100644 --- a/rand/crypto_rand/func.go +++ b/rand/crypto_rand/func.go @@ -6,7 +6,7 @@ import ( "fmt" "math/big" - "github.com/helays/utils/v2/crypto/md5" + "helay.net/go/utils/v3/crypto/md5" ) // diff --git a/rand/math_rand/rand.go b/rand/math_rand/rand.go index 4be09a2..3c8d3e9 100644 --- a/rand/math_rand/rand.go +++ b/rand/math_rand/rand.go @@ -3,7 +3,7 @@ package math_rand import ( "math/rand/v2" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) // diff --git a/rule-engine/formatter/format.rule.date.go b/rule-engine/formatter/format.rule.date.go index 874b9bb..8875d16 100644 --- a/rule-engine/formatter/format.rule.date.go +++ b/rule-engine/formatter/format.rule.date.go @@ -5,7 +5,7 @@ import ( "time" "github.com/araddon/dateparse" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // 时间格式化 diff --git a/rule-engine/validator/operators/advanced_validator.go b/rule-engine/validator/operators/advanced_validator.go index a463815..a20a376 100644 --- a/rule-engine/validator/operators/advanced_validator.go +++ b/rule-engine/validator/operators/advanced_validator.go @@ -2,7 +2,7 @@ package operators import ( "fmt" - "github.com/helays/utils/v2/rule-engine/validator/types" + "helay.net/go/utils/v3/rule-engine/validator/types" ) func ValidateAdvanced(operator types.Operator, value any, rule []any) (string, bool) { diff --git a/rule-engine/validator/operators/content_validator.go b/rule-engine/validator/operators/content_validator.go index ecb88b0..19e7ef0 100644 --- a/rule-engine/validator/operators/content_validator.go +++ b/rule-engine/validator/operators/content_validator.go @@ -3,8 +3,8 @@ package operators import ( "fmt" "github.com/araddon/dateparse" - "github.com/helays/utils/v2/rule-engine/validator/types" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/rule-engine/validator/types" + "helay.net/go/utils/v3/tools" "regexp" "strings" "time" diff --git a/rule-engine/validator/operators/format_validator.go b/rule-engine/validator/operators/format_validator.go index f98aa83..a1eaba7 100644 --- a/rule-engine/validator/operators/format_validator.go +++ b/rule-engine/validator/operators/format_validator.go @@ -5,9 +5,9 @@ import ( "encoding/json" "encoding/xml" "github.com/google/uuid" - "github.com/helays/utils/v2/net/checkIp" - "github.com/helays/utils/v2/rule-engine/validator/types" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/net/checkIp" + "helay.net/go/utils/v3/rule-engine/validator/types" + "helay.net/go/utils/v3/tools" "net/mail" "net/url" "regexp" diff --git a/rule-engine/validator/operators/length_validator.go b/rule-engine/validator/operators/length_validator.go index 17dcdbd..3d6adf7 100644 --- a/rule-engine/validator/operators/length_validator.go +++ b/rule-engine/validator/operators/length_validator.go @@ -3,8 +3,8 @@ package operators import ( "fmt" - "github.com/helays/utils/v2/rule-engine/validator/types" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/rule-engine/validator/types" + "helay.net/go/utils/v3/tools" ) func ValidateLength(operator types.Operator, value any, rule []any) (string, bool) { diff --git a/rule-engine/validator/operators/type_validator.go b/rule-engine/validator/operators/type_validator.go index 5a36fef..c8a991a 100644 --- a/rule-engine/validator/operators/type_validator.go +++ b/rule-engine/validator/operators/type_validator.go @@ -3,8 +3,8 @@ package operators import ( "fmt" "github.com/araddon/dateparse" - "github.com/helays/utils/v2/rule-engine/validator/types" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/rule-engine/validator/types" + "helay.net/go/utils/v3/tools" "strconv" "strings" "time" diff --git a/rule-engine/validator/readme.md b/rule-engine/validator/readme.md index 5a6bea7..a4251bb 100644 --- a/rule-engine/validator/readme.md +++ b/rule-engine/validator/readme.md @@ -41,8 +41,8 @@ ```go import ( - "github.com/helays/utils/v2/rule-engine/validator" - "github.com/helays/utils/v2/rule-engine/validator/types" + "helay.net/go/utils/v3/rule-engine/validator" + "helay.net/go/utils/v3/rule-engine/validator/types" ) func main() { diff --git a/rule-engine/validator/rule.go b/rule-engine/validator/rule.go index 5db732f..0026df7 100644 --- a/rule-engine/validator/rule.go +++ b/rule-engine/validator/rule.go @@ -2,8 +2,8 @@ package validator import ( "fmt" - "github.com/helays/utils/v2/rule-engine/validator/operators" - "github.com/helays/utils/v2/rule-engine/validator/types" + "helay.net/go/utils/v3/rule-engine/validator/operators" + "helay.net/go/utils/v3/rule-engine/validator/types" "strings" "sync" ) diff --git a/rule-engine/validator/rule_check.go b/rule-engine/validator/rule_check.go index cb21c59..b802e13 100644 --- a/rule-engine/validator/rule_check.go +++ b/rule-engine/validator/rule_check.go @@ -2,7 +2,7 @@ package validator import ( "fmt" - "github.com/helays/utils/v2/rule-engine/validator/types" + "helay.net/go/utils/v3/rule-engine/validator/types" ) func (r *Rule) CheckRule(dataTypeMap map[string]string) error { diff --git a/rule-engine/validator/stack_utils.go b/rule-engine/validator/stack_utils.go index e5e2ca7..3f94796 100644 --- a/rule-engine/validator/stack_utils.go +++ b/rule-engine/validator/stack_utils.go @@ -1,7 +1,7 @@ package validator import ( - "github.com/helays/utils/v2/rule-engine/validator/types" + "helay.net/go/utils/v3/rule-engine/validator/types" "sync" ) diff --git a/safe/cachemgr/rdbms/types.go b/safe/cachemgr/rdbms/types.go index b22780e..75e8143 100644 --- a/safe/cachemgr/rdbms/types.go +++ b/safe/cachemgr/rdbms/types.go @@ -1,8 +1,8 @@ package rdbms import ( - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/db" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/db" ) // CacheFast 采用双hash模式,缓存数据结构 diff --git a/safe/cachemgr/types.go b/safe/cachemgr/types.go index 3a841f2..f588642 100644 --- a/safe/cachemgr/types.go +++ b/safe/cachemgr/types.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/helays/utils/v2/safe" + "helay.net/go/utils/v3/safe" ) // Cache 缓存接口 diff --git a/safe/map.go b/safe/map.go index b7b0680..15cce5e 100644 --- a/safe/map.go +++ b/safe/map.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // 泛型 并发安全map,利用分片map提升并发性能。 diff --git a/safe/safettl/safe_map_perttl.go b/safe/safettl/safe_map_perttl.go index e71fa2b..bb7a4bb 100644 --- a/safe/safettl/safe_map_perttl.go +++ b/safe/safettl/safe_map_perttl.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // PerKeyTTLMap 是支持每个键单独 TTL 的泛型安全 Map diff --git a/security/cors/apply.go b/security/cors/apply.go index f49893a..69ff58f 100644 --- a/security/cors/apply.go +++ b/security/cors/apply.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) func (c *Config) Apply(w http.ResponseWriter, origin string) bool { diff --git a/security/cors/cors_std/manager.go b/security/cors/cors_std/manager.go index 130da12..c853d9a 100644 --- a/security/cors/cors_std/manager.go +++ b/security/cors/cors_std/manager.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/security/cors" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/security/cors" ) type StdCORS struct { diff --git a/security/cors/cors_std/middleware.go b/security/cors/cors_std/middleware.go index d5b9952..2e2a840 100644 --- a/security/cors/cors_std/middleware.go +++ b/security/cors/cors_std/middleware.go @@ -3,7 +3,7 @@ package cors_std import ( "net/http" - "github.com/helays/utils/v2/security/cors" + "helay.net/go/utils/v3/security/cors" ) func Cors(opt cors.Config) func(next http.Handler) http.Handler { diff --git a/security/cors/types.go b/security/cors/types.go index 7c3198a..77b131a 100644 --- a/security/cors/types.go +++ b/security/cors/types.go @@ -5,11 +5,11 @@ import ( "database/sql/driver" "encoding/json" - "github.com/helays/utils/v2/dataType" "github.com/vmihailenco/msgpack/v5" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/dataType" ) // Config CORS配置结构体 diff --git a/security/csrf/csrf_std/manager.go b/security/csrf/csrf_std/manager.go index 3b3df9d..9f9b508 100644 --- a/security/csrf/csrf_std/manager.go +++ b/security/csrf/csrf_std/manager.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - "github.com/helays/utils/v2/net/http/response" - "github.com/helays/utils/v2/net/http/session" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/security/csrf" + "helay.net/go/utils/v3/net/http/response" + "helay.net/go/utils/v3/net/http/session" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/security/csrf" ) type Std struct { diff --git a/security/csrf/csrf_std/validate.go b/security/csrf/csrf_std/validate.go index d30c5b4..2e1e8ee 100644 --- a/security/csrf/csrf_std/validate.go +++ b/security/csrf/csrf_std/validate.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/helays/utils/v2/security/csrf" + "helay.net/go/utils/v3/security/csrf" ) // getClientToken 获取客户端的token diff --git a/security/csrf/types.go b/security/csrf/types.go index 290a24a..41c5600 100644 --- a/security/csrf/types.go +++ b/security/csrf/types.go @@ -7,13 +7,13 @@ import ( "net/http" "time" - "github.com/helays/utils/v2/crypto/xxhashkit" - "github.com/helays/utils/v2/dataType" - "github.com/helays/utils/v2/tools" "github.com/vmihailenco/msgpack/v5" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" + "helay.net/go/utils/v3/crypto/xxhashkit" + "helay.net/go/utils/v3/dataType" + "helay.net/go/utils/v3/tools" ) type Strategy string diff --git a/security/jwtkit/jwt.go b/security/jwtkit/jwt.go index 77e0622..e2e02e4 100644 --- a/security/jwtkit/jwt.go +++ b/security/jwtkit/jwt.go @@ -4,8 +4,8 @@ import ( "time" "github.com/golang-jwt/jwt/v5" - "github.com/helays/utils/v2/tools" - "github.com/helays/utils/v2/tools/sonyflakekit" + "helay.net/go/utils/v3/tools" + "helay.net/go/utils/v3/tools/sonyflakekit" ) type JWTManager struct { diff --git a/security/jwtkit/keyloader.go b/security/jwtkit/keyloader.go index e1b0503..28005ea 100644 --- a/security/jwtkit/keyloader.go +++ b/security/jwtkit/keyloader.go @@ -14,8 +14,8 @@ import ( "os" "path/filepath" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/tools" ) var ( diff --git a/security/jwtkit/types.go b/security/jwtkit/types.go index 981b76b..e60b3e8 100644 --- a/security/jwtkit/types.go +++ b/security/jwtkit/types.go @@ -10,7 +10,7 @@ import ( "time" "github.com/golang-jwt/jwt/v5" - "github.com/helays/utils/v2/dataType" + "helay.net/go/utils/v3/dataType" ) type Options struct { diff --git a/security/lockpolicy/cache.go b/security/lockpolicy/cache.go index 7555cda..9a246d9 100644 --- a/security/lockpolicy/cache.go +++ b/security/lockpolicy/cache.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/helays/utils/v2/safe" + "helay.net/go/utils/v3/safe" ) // targetCache 锁定目标缓存 diff --git a/security/lockpolicy/manager.go b/security/lockpolicy/manager.go index bf6d741..f346db8 100644 --- a/security/lockpolicy/manager.go +++ b/security/lockpolicy/manager.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/helays/utils/v2/safe" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/safe" + "helay.net/go/utils/v3/tools" ) type Manager struct { diff --git a/security/lockpolicy/policy_valid.go b/security/lockpolicy/policy_valid.go index 0f17f5b..5e04756 100644 --- a/security/lockpolicy/policy_valid.go +++ b/security/lockpolicy/policy_valid.go @@ -3,7 +3,7 @@ package lockpolicy import ( "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) // Valid 锁定策略验证 diff --git a/shell/shell.go b/shell/shell.go index c82bdb8..acad61d 100644 --- a/shell/shell.go +++ b/shell/shell.go @@ -3,10 +3,10 @@ package shell import ( "bytes" "errors" - "github.com/helays/utils/v2" - "github.com/helays/utils/v2/crypto/md5" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3" + "helay.net/go/utils/v3/crypto/md5" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" "os" "os/exec" "regexp" diff --git a/signalTools/func.go b/signalTools/func.go index d41bacd..495072c 100644 --- a/signalTools/func.go +++ b/signalTools/func.go @@ -5,7 +5,7 @@ import ( "os/signal" "syscall" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/logger/ulogs" ) // SignalHandle 系统信号 diff --git a/template/pagination/pagination.go b/template/pagination/pagination.go index a20ed17..0976a60 100644 --- a/template/pagination/pagination.go +++ b/template/pagination/pagination.go @@ -1,7 +1,7 @@ package pagination import ( - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" "math" ) diff --git a/template/template_engine/enginetools.go b/template/template_engine/enginetools.go index e21c2a4..5749b43 100644 --- a/template/template_engine/enginetools.go +++ b/template/template_engine/enginetools.go @@ -4,7 +4,7 @@ import ( "html/template" "time" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) func builtinFuncMap() template.FuncMap { diff --git a/template/template_engine/utils.go b/template/template_engine/utils.go index d55b4b9..7f5c143 100644 --- a/template/template_engine/utils.go +++ b/template/template_engine/utils.go @@ -2,7 +2,7 @@ package template_engine import ( "fmt" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" "html" "net/url" "time" diff --git a/tools/array.go b/tools/array.go index dea8618..87e44cd 100644 --- a/tools/array.go +++ b/tools/array.go @@ -7,8 +7,8 @@ import ( "sort" "strings" - "github.com/helays/utils/v2/config" "golang.org/x/exp/constraints" + "helay.net/go/utils/v3/config" ) // ArrayChunk 高性能泛型切片分块函数 diff --git a/tools/date.format.go b/tools/date.format.go index 13297a6..26a1c87 100644 --- a/tools/date.format.go +++ b/tools/date.format.go @@ -3,7 +3,7 @@ package tools import ( "strings" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) // 判断是否是Go语言的时间格式模板 diff --git a/tools/decode/streamdecode_json/excel_csv.go b/tools/decode/streamdecode_json/excel_csv.go index a55bee1..a47f9be 100644 --- a/tools/decode/streamdecode_json/excel_csv.go +++ b/tools/decode/streamdecode_json/excel_csv.go @@ -7,11 +7,11 @@ import ( "strings" "time" - "github.com/helays/utils/v2/dataType/customWriter" - "github.com/helays/utils/v2/excelTools" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/tools" "github.com/xuri/excelize/v2" + "helay.net/go/utils/v3/dataType/customWriter" + "helay.net/go/utils/v3/excelTools" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/tools" ) // 参数验证 diff --git a/tools/decode/streamdecode_json/jsonline.go b/tools/decode/streamdecode_json/jsonline.go index a00d390..f6ba4e6 100644 --- a/tools/decode/streamdecode_json/jsonline.go +++ b/tools/decode/streamdecode_json/jsonline.go @@ -5,7 +5,7 @@ import ( "encoding/json" "io" - "github.com/helays/utils/v2/dataType/customWriter" + "helay.net/go/utils/v3/dataType/customWriter" ) func (i *Import) processLine(handler JSONHandler) (totalSize int64, err error) { diff --git a/tools/decode/streamdecode_json/jsonstr.go b/tools/decode/streamdecode_json/jsonstr.go index cbfd0e1..6b12c22 100644 --- a/tools/decode/streamdecode_json/jsonstr.go +++ b/tools/decode/streamdecode_json/jsonstr.go @@ -5,7 +5,7 @@ import ( "io" "github.com/goccy/go-json" - "github.com/helays/utils/v2/dataType/customWriter" + "helay.net/go/utils/v3/dataType/customWriter" ) func (i *Import) processJSON(handler JSONHandler) (totalSize int64, err error) { diff --git a/tools/decode/streamdecode_json/struct.go b/tools/decode/streamdecode_json/struct.go index 9d9159e..e34f010 100644 --- a/tools/decode/streamdecode_json/struct.go +++ b/tools/decode/streamdecode_json/struct.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/helays/utils/v2/dataType" + "helay.net/go/utils/v3/dataType" ) type JSONHandler func(ctx context.Context, obj map[string]interface{}) error diff --git a/tools/diffrangeable_test.go b/tools/diffrangeable_test.go index d8bc676..3297b20 100644 --- a/tools/diffrangeable_test.go +++ b/tools/diffrangeable_test.go @@ -3,7 +3,7 @@ package tools_test import ( "testing" - "github.com/helays/utils/v2/tools" + "helay.net/go/utils/v3/tools" ) type User struct { diff --git a/tools/file.go b/tools/file.go index 3198b8b..1d8c414 100644 --- a/tools/file.go +++ b/tools/file.go @@ -7,10 +7,10 @@ import ( "path/filepath" "strings" - "github.com/helays/utils/v2/close/osClose" - "github.com/helays/utils/v2/close/vclose" - "github.com/helays/utils/v2/config" - "github.com/helays/utils/v2/logger/ulogs" + "helay.net/go/utils/v3/close/osClose" + "helay.net/go/utils/v3/close/vclose" + "helay.net/go/utils/v3/config" + "helay.net/go/utils/v3/logger/ulogs" ) type ReadRowCallback func(scanner *bufio.Scanner) error diff --git a/tools/fileinclude/include.go b/tools/fileinclude/include.go index 69ea0cd..085ed11 100644 --- a/tools/fileinclude/include.go +++ b/tools/fileinclude/include.go @@ -8,7 +8,7 @@ import ( "path/filepath" "strings" - "github.com/helays/utils/v2/close/vclose" + "helay.net/go/utils/v3/close/vclose" ) // Processor 文件包含处理器 diff --git a/tools/func.go b/tools/func.go index f540ef2..b67b83b 100644 --- a/tools/func.go +++ b/tools/func.go @@ -15,8 +15,8 @@ import ( "strings" "time" - "github.com/helays/utils/v2/config" "golang.org/x/exp/constraints" + "helay.net/go/utils/v3/config" ) // PadRight 在字符串后面补齐固定字符,并达到n个长度 diff --git a/tools/ringbuffer/impl/array.go b/tools/ringbuffer/impl/array.go index b4f2697..fb15452 100644 --- a/tools/ringbuffer/impl/array.go +++ b/tools/ringbuffer/impl/array.go @@ -2,7 +2,7 @@ package impl import ( - "github.com/helays/utils/v2/tools/ringbuffer/calculator" + "helay.net/go/utils/v3/tools/ringbuffer/calculator" ) // arrayBuffer 基于数组的环形缓冲区实现 diff --git a/tools/ringbuffer/ringbuffer.go b/tools/ringbuffer/ringbuffer.go index b10aa5b..2aae43d 100644 --- a/tools/ringbuffer/ringbuffer.go +++ b/tools/ringbuffer/ringbuffer.go @@ -3,7 +3,7 @@ package ringbuffer import ( "errors" - "github.com/helays/utils/v2/tools/ringbuffer/impl" + "helay.net/go/utils/v3/tools/ringbuffer/impl" "reflect" "sync" "sync/atomic" diff --git a/tools/run.scheduler.go b/tools/run.scheduler.go index 5dc6ff1..ca03c4a 100644 --- a/tools/run.scheduler.go +++ b/tools/run.scheduler.go @@ -5,7 +5,7 @@ import ( "math/rand/v2" "time" - "github.com/helays/utils/v2/config" + "helay.net/go/utils/v3/config" ) // RunSyncFunc 同步运行 diff --git a/whois/whois.go b/whois/whois.go index 7bf4771..9694c8f 100644 --- a/whois/whois.go +++ b/whois/whois.go @@ -9,9 +9,9 @@ import ( "sync" "time" - "github.com/helays/utils/v2/close/netClose" - "github.com/helays/utils/v2/logger/ulogs" - "github.com/helays/utils/v2/worker" + "helay.net/go/utils/v3/close/netClose" + "helay.net/go/utils/v3/logger/ulogs" + "helay.net/go/utils/v3/worker" ) var (