init project

This commit is contained in:
2025-03-28 17:14:57 +08:00
parent 76ca33962e
commit 4d08921f92
357 changed files with 54458 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package initialize
import (
"fmt"
"{{.Module}}/global"
"{{.Module}}/plugin/{{ .Package }}/plugin"
"github.com/pkg/errors"
"go.uber.org/zap"
)
func Viper() {
err := global.GVA_VP.UnmarshalKey("{{ .Package }}", &plugin.Config)
if err != nil {
err = errors.Wrap(err, "初始化配置文件失败!")
zap.L().Error(fmt.Sprintf("%+v", err))
}
}