Comments (2)
拆出来使用 - 要怎么用?写个简单的示例看看呢
from event.
编写自定义事件Event,嵌入 event.BasicEvent
就可以了
package mypgk
import "github.com/gookit/event"
type MyEvent struct {
event.BasicEvent
customData string
}
func (e *MyEvent) CustomData() string {
return e.customData
}
from event.
Related Issues (20)
- 支持根据事件名称前缀 PREFIX.* 来进行一组事件监听 这个使用有BUG
- Any more examples on how to use some of the capabilities? HOT 2
- Possible to add Event Timer Triggers? HOT 7
- Channels on Fire func HOT 3
- functionality Wildcard HOT 2
- How to register a subscriber ? HOT 2
- 见图片,并发下数据会有问题 HOT 1
- 使用自定义事件,并发会有问题 HOT 4
- 这个是不支持在事件中去触发另一个事件的吗 HOT 1
- 这个触发异步事件有具体的写法 贴一下吗 HOT 2
- I'm here again,V1.1.1 has goroutine leak.please see this eg. HOT 4
- 如何比较好的处理 HOT 1
- goroutine并发添加event时候提示fatal error: concurrent map writes HOT 4
- 异步多线程消费 HOT 1
- matchNodePath是否可以支持自定义分隔符
- 建议 Event Name 检查出错后返回 error,而不是直接 panic
- 异步事件,不执行
- Custom events failed to execute HOT 1
- How to unregisterListener ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from event.