Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vorot93/golang-signals
- Owner: vorot93
- License: mit
- Created: 2017-02-20T17:59:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-02-21T07:07:45.000Z (over 7 years ago)
- Last Synced: 2024-10-11T01:15:00.421Z (about 1 month ago)
- Topics: golang, signals-library, sigslot
- Language: Go
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
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 stringvar 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)
}
```