package initialize

import (
	"fmt"
	"{{.Module}}/internal/conf"
	"{{.Module}}/internal/plugin/{{ .Package }}/plugin"
	"github.com/go-kratos/kratos/v2/log"
	"github.com/pkg/errors"
)

func Viper() {
	err := conf.VP.UnmarshalKey("{{ .Package }}", &plugin.Config)
	if err != nil {
		err = errors.Wrap(err, "初始化配置文件失败!")
		log.Error(fmt.Sprintf("%+v", err))
	}
}
