Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vorot93/golang-signals

Simple sigslot library for golang
https://github.com/vorot93/golang-signals

golang signals-library sigslot

Last synced: 19 days ago
JSON representation

Simple sigslot library for golang

Awesome Lists containing this project

README

        

# golang-signals
Very simple signals library.

## Example usage
```
func main() {
type MyType struct {
MySignal Signal
}

var v MyType
var result string

var id = v.MySignal.Connect(func(data interface{}) {
var str, _ = data.(string)
result = str
})
v.MySignal.Emit("edited")

fmt.Printf("Callback %d printed: %s\n", id, result)
}
```