Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. func (r *Router) Get(path string, controller interface{}) {
  2. ...
  3. t := reflect.TypeOf(controller)
  4. ...
  5. }
  6.  
  7. Route.Get("/", controllers.Test.IsWorking)
  8.  
  9. type Test struct {
  10. *Controller
  11. Name string
  12. }
  13.  
  14. func (t Test) IsWorking() {
  15.  
  16. }
  17.  
  18. type Controller struct {
  19. Method string
  20. Request *http.Request
  21. Response http.ResponseWriter
  22. Data map[interface{}]interface{}
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement