Finish the System Cleanup feature.

This commit is contained in:
zicla
2019-04-04 03:14:47 +08:00
parent 7697891807
commit 5936f917b3
15 changed files with 158 additions and 15 deletions

View File

@ -8,6 +8,8 @@ import (
type IBean interface {
//初始化方法
Init()
//系统清理方法
Cleanup()
//所有配置都加载完成后调用的方法,包括数据库加载完毕
ConfigPost()
//快速的Panic方法
@ -26,6 +28,11 @@ func (this *Bean) ConfigPost() {
}
//系统大清理,一般时产品即将上线时,清除脏数据,只执行一次。
func (this *Bean) Cleanup() {
}
//处理错误的统一方法 可以省去if err!=nil 这段代码
func (this *Bean) PanicError(err error) {
if err != nil {