init the project

This commit is contained in:
Zic
2017-12-23 18:02:11 +08:00
commit 81e14d12ea
54 changed files with 6829 additions and 0 deletions

21
rest/bean.go Normal file
View File

@ -0,0 +1,21 @@
package rest
type IBean interface {
Init(context *Context)
PanicError(err error);
}
type Bean struct {
context *Context
}
func (this *Bean) Init(context *Context) {
this.context = context
}
//处理错误的统一方法
func (this *Bean) PanicError(err error) {
if err != nil {
panic(err)
}
}