package initialize

import (
	"fmt"

	"github.com/pkg/errors"
	"github.com/spf13/viper"
	"go.uber.org/zap"
	"kra/internal/plugin/announcement/global"
)

func Viper(vp *viper.Viper) {
	err := vp.UnmarshalKey("announcement", &global.Config)
	if err != nil {
		err = errors.Wrap(err, "初始化配置文件失败!")
		zap.L().Error(fmt.Sprintf("%+v", err))
	}
}
