Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 873 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 873 Bytes

light

godoc codecov sourcegrpah

Simple to use, "zero-allocation" event system

Installation

To install package use command:

go get github.com/beldmian/light

Example

light.Handle("hello", func(e light.Event) error {
    fmt.Printf("Hello, %s\n", e.Payload["name"])
    return nil
})

light.Emit(light.Event{
    Name:    "hello",
    Payload: map[string]interface{}{"name": "light"},
})

Contribute

All contributions are welcome. Please open issue if you want to provide some new features.