You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
continuous-integration/drone/push Build is passing
Details
|
3 years ago | |
---|---|---|
.drone.yml | 3 years ago | |
LICENSE | 8 years ago | |
README.md | 3 years ago | |
circle.yml | 6 years ago | |
events.go | 4 years ago | |
events_test.go | 4 years ago | |
go.mod | 3 years ago | |
go.sum | 3 years ago |
README.md
events

Middleware events is an event middleware for Tango.
Installation
go get gitea.com/tango/events
Simple Example
type EventAction struct {
tango.Ctx
}
func (c *EventAction) Get() {
c.Write([]byte("get"))
}
func (c *EventAction) Before() {
c.Write([]byte("before "))
}
func (c *EventAction) After() {
c.Write([]byte(" after"))
}
func main() {
t := tango.Classic()
t.Use(events.Events())
t.Get("/", new(EventAction))
t.Run()
}
License
This project is under BSD License. See the LICENSE file for the full license text.