Finish the System Cleanup feature.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user