在init函数中注册插件
()
| 74 | |
| 75 | // 在init函数中注册插件 |
| 76 | func init() { |
| 77 | plugin.RegisterGlobalPlugin(NewDuoduoPlugin()) |
| 78 | |
| 79 | // 启动缓存清理goroutine |
| 80 | go startCacheCleaner() |
| 81 | } |
| 82 | |
| 83 | // startCacheCleaner 启动一个定期清理缓存的goroutine |
| 84 | func startCacheCleaner() { |
nothing calls this directly
no test coverage detected