增加单元测试,统一初始化方法

This commit is contained in:
ayflying
2025-04-02 15:19:49 +08:00
parent 1d0661ae40
commit 743d232c38
10 changed files with 133 additions and 46 deletions

View File

@@ -1,10 +1,9 @@
package utility_go
import (
"github.com/ayflying/utility_go/config"
"github.com/ayflying/utility_go/internal/boot"
_ "github.com/ayflying/utility_go/internal/logic"
"github.com/ayflying/utility_go/config"
"github.com/gogf/gf/v2/os/gctx"
)
@@ -14,8 +13,12 @@ var (
)
func init() {
var err = boot.Boot()
if err != nil {
panic(err)
}
go func() {
// 初始化配置
var err = boot.Boot()
if err != nil {
panic(err)
}
}()
}