Example #1
0
func main() {
	gocchan.AddFeature("notify", &NotifyFeature{})
	gocchan.AddEventListener(&NotifyListen{})
	gocchan.Invoke("", "notify", "Panic", nil)
	gocchan.WaitNotify()
}
Example #2
0
func init() {
	gocchan.AddFeature("hello", &HelloFeature{})
}
Example #3
0
func main() {
	gocchan.AddFeature("types", &TypesFeature{})
	gocchan.Invoke("string", "types", "CallByString", nil)              // print "string"
	gocchan.Invoke(1, "types", "CallByInt", nil)                        // print "1"
	gocchan.Invoke(&TestStruct{"struct"}, "types", "CallByStruct", nil) // print "&{struct}"
}