package svc import ( "git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/config" "git.noahlan.cn/noahlan/ntool-biz/core/i18n" "git.noahlan.cn/noahlan/ntool-biz/zero/logz" "git.noahlan.cn/noahlan/ntool/nlog" "github.com/zeromicro/go-zero/core/logx" ) type ServiceContext struct { Config config.Config } func NewServiceContext(c config.Config) *ServiceContext { nlog.MustSetup(logz.WrapConf(c.Log)) logx.SetWriter(logz.NewWriter()) // 配置多语言 i18n.InitWithConfig(c.I18nConf) return &ServiceContext{ Config: c, } }