func helloWorld2() { gocchan.Invoke(nil, "hello", "Say2", func() { fmt.Println("Hello world!") }) }
func main() { gocchan.AddFeature("notify", &NotifyFeature{}) gocchan.AddEventListener(&NotifyListen{}) gocchan.Invoke("", "notify", "Panic", nil) gocchan.WaitNotify() }
func helloWorld1(ctx bool) { gocchan.Invoke(ctx, "hello", "Say1", func() { fmt.Println("Hello world!") }) }
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}" }