Ready to refine the context and router bean.
This commit is contained in:
11
code/core/controller.go
Normal file
11
code/core/controller.go
Normal file
@ -0,0 +1,11 @@
|
||||
package core
|
||||
|
||||
import "net/http"
|
||||
|
||||
type IController interface {
|
||||
IBean
|
||||
//注册自己固定的路由。
|
||||
RegisterRoutes() map[string]func(writer http.ResponseWriter, request *http.Request)
|
||||
//处理一些特殊的路由。
|
||||
HandleRoutes(writer http.ResponseWriter, request *http.Request) (func(writer http.ResponseWriter, request *http.Request), bool)
|
||||
}
|
Reference in New Issue
Block a user