func main() { gocchan.AddFeature("notify", &NotifyFeature{}) gocchan.AddEventListener(&NotifyListen{}) gocchan.Invoke("", "notify", "Panic", nil) gocchan.WaitNotify() }
func init() { gocchan.AddFeature("hello", &HelloFeature{}) }
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}" }