You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
305 B
21 lines
305 B
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)
|
|
}
|
|
}
|
|
|