1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

获取企业微信实例,设置全局Cache (#671)

Co-authored-by: masong <misu99@github.com>
This commit is contained in:
misu
2023-04-18 11:06:39 +08:00
committed by GitHub
parent d6371c7289
commit cb0928a03c

View File

@@ -76,5 +76,8 @@ func (wc *Wechat) GetOpenPlatform(cfg *openConfig.Config) *openplatform.OpenPlat
// GetWork 获取企业微信的实例 // GetWork 获取企业微信的实例
func (wc *Wechat) GetWork(cfg *workConfig.Config) *work.Work { func (wc *Wechat) GetWork(cfg *workConfig.Config) *work.Work {
if cfg.Cache == nil {
cfg.Cache = wc.cache
}
return work.NewWork(cfg) return work.NewWork(cfg)
} }