Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func (r *Router) Get(path string, controller interface{}) {
- ...
- t := reflect.TypeOf(controller)
- ...
- }
- Route.Get("/", controllers.Test.IsWorking)
- type Test struct {
- *Controller
- Name string
- }
- func (t Test) IsWorking() {
- }
- type Controller struct {
- Method string
- Request *http.Request
- Response http.ResponseWriter
- Data map[interface{}]interface{}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement