Events 事件

    使用

    1. tango.Ctx
    2. }
    3. func (c *EventAction) Get() {
    4. }
    5. func (c *EventAction) Before() {
    6. c.Write([]byte("before "))
    7. }
    8. func (c *EventAction) After() {
    9. func main() {
    10. t := tango.Classic()
    11. t.Use(events.Events())
    12. t.Get("/", new(EventAction))
    13. t.Run()