BERJAYAlunny dd347b1432 BERJAYA
checks / check and test (push) Successful in 32s
Use actions instead of drone
2023-04-20 15:26:39 +08:00
2019-03-26 15:51:28 +08:00
2019-10-31 22:25:31 +08:00
2019-10-31 22:25:31 +08:00
2015-04-28 15:46:54 +08:00
2019-10-31 22:25:31 +08:00

events Build Status BERJAYA

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.

S
Description
Events middleware for tango
Readme 32 KiB
Languages
Go 100%