1 Star 0 Fork 0

water/gobase

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
struct_info_init.go 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2025-02-04 10:55 +08:00 . add
package dimeta
import (
"gitee.com/leijmdas/gobase/goconfig/common/base/baseiface"
"gitee.com/leijmdas/gobase/goconfig/common/basedi"
"github.com/sirupsen/logrus"
)
/*
* ********************************************************
* godi工具生成代码,不建议直接修改!
* ********************************************************
*/
/* ********************************************************
@Title 文件名称: struct_info_init.go
@Desp 描述: 自动注册注入
@Author 作者: LEIJMDAS@163.COM 时间(2024-05-11 06:55:37)
@Update 作者: LEIJMDAS@163.COM 时间(2024-05-11 06:55:37)
* *********************************************************/
const singleNameStructInfo = "dimeta.StructInfo"
// init register load
func init() {
registerBeanStructInfo()
}
// register StructInfo
func registerBeanStructInfo() {
basedi.RegisterLoadBean(singleNameStructInfo, LoadStructInfo)
}
func FindBeanStructInfo() *StructInfo {
bean, ok := basedi.FindBean(singleNameStructInfo).(*StructInfo)
if !ok {
logrus.Errorf("FindBeanStructInfo: failed to cast bean to *StructInfo")
return nil
}
return bean
}
func LoadStructInfo() baseiface.ISingleton {
var s = NewStructInfo()
InjectStructInfo(s)
return s
}
func InjectStructInfo(s *StructInfo) {
// logrus.Debug("inject")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/leijmdas/gobase.git
git@gitee.com:leijmdas/gobase.git
leijmdas
gobase
gobase
e3601d1820c0

搜索帮助