go语言中实现插件管理
目的在一个项目中,通过插件的方式,选用不同的后端存储方案定义插件接口type TagStore interface { Name() string Init(opts ...Option) (err error) TagInset() TagUpdate(tag string) TagFind() (tag string)}定义一个plugin管理结构type TagStorePluginMgr struct { tagStores map[s
原创
2020-07-28 16:12:01 ·
377 阅读 ·
0 评论