Skip to content

Commit

Permalink
获取企业微信实例,设置全局Cache (#671)
Browse files Browse the repository at this point in the history
Co-authored-by: masong <misu99@github.com>
  • Loading branch information
misu99 and masong authored Apr 18, 2023
1 parent d6371c7 commit cb0928a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,8 @@ func (wc *Wechat) GetOpenPlatform(cfg *openConfig.Config) *openplatform.OpenPlat

// GetWork 获取企业微信的实例
func (wc *Wechat) GetWork(cfg *workConfig.Config) *work.Work {
if cfg.Cache == nil {
cfg.Cache = wc.cache
}
return work.NewWork(cfg)
}

0 comments on commit cb0928a

Please sign in to comment.