Skip to content

vorot93/golang-signals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

Simple sigslot library for golang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages