/app/controller/hello.go

http://github.com/sut-go/gon · Go · 23 lines · 12 code · 4 blank · 7 comment · 0 complexity · 354b8207aa908798a3fcfe89f4bf8c96 MD5 · raw file

  1. package hello
  2. import . "framework/mv"
  3. import "app/domain/user"
  4. import "fmt"
  5. type HelloController struct {
  6. Params
  7. *user.UserService
  8. }
  9. func (c *HelloController) Index() Model {
  10. fmt.Printf("id = %s\n", c.Params["id"])
  11. return Model{"user": ""}
  12. // book.Get(c.Params["id"])}
  13. //
  14. // /hello/index/doc1
  15. // /:controller/:action/:id
  16. //
  17. // return book.findById(Params["id"])
  18. //
  19. }