```
refactor(print): 将 print 包重命名为 printer 并更新所有引用 将项目中的 print 包统一重命名为 printer,以避免与标准库或第三方库产生命名冲突。同时, 更新了所有相关模块对该包的引用,确保功能一致性和代码可维护性。 涉及文件包括: - conf/new.go - infra/service.go - service/register.go - service/service.go - with/databases.go - with/etcd.go - with/memory.go - with/redis.go 此外,删除了以下已废弃或未使用的代码文件: - cmd/cmd.go - data/map_float.go - data/map_string.go - oplog/new.go - oplog/types.go - print/print.go - utils/ext.go ```
This commit is contained in:
12
conf/new.go
12
conf/new.go
@@ -11,7 +11,7 @@ import (
|
||||
"math/rand/v2"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/env"
|
||||
"git.apinb.com/bsm-sdk/core/print"
|
||||
"git.apinb.com/bsm-sdk/core/printer"
|
||||
"git.apinb.com/bsm-sdk/core/utils"
|
||||
"git.apinb.com/bsm-sdk/core/vars"
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
@@ -36,8 +36,8 @@ func New(srvKey string, cfg any) {
|
||||
cfp = filepath.Join(env.Runtime.Prefix, "etc", cfp)
|
||||
}
|
||||
|
||||
print.Info("[BSM - %s] Config File: %s", srvKey, cfp)
|
||||
print.Info("[BSM - %s] Check Configure ...", vars.ServiceKey)
|
||||
printer.Info("[BSM - %s] Config File: %s", srvKey, cfp)
|
||||
printer.Info("[BSM - %s] Check Configure ...", vars.ServiceKey)
|
||||
|
||||
// 读取配置文件内容
|
||||
yamlFile, err := os.ReadFile(cfp)
|
||||
@@ -69,9 +69,9 @@ func NotNil(values ...string) {
|
||||
}
|
||||
|
||||
func PrintInfo(addr string) {
|
||||
print.Success("[BSM - %s] Config Check Success.", vars.ServiceKey)
|
||||
print.Info("[BSM - %s] Service Name: %s", vars.ServiceKey, vars.ServiceKey)
|
||||
print.Info("[BSM - %s] Runtime Mode: %s", vars.ServiceKey, env.Runtime.Mode)
|
||||
printer.Success("[BSM - %s] Config Check Success.", vars.ServiceKey)
|
||||
printer.Info("[BSM - %s] Service Name: %s", vars.ServiceKey, vars.ServiceKey)
|
||||
printer.Info("[BSM - %s] Runtime Mode: %s", vars.ServiceKey, env.Runtime.Mode)
|
||||
}
|
||||
|
||||
func CheckPort(port string) string {
|
||||
|
||||
Reference in New Issue
Block a user