Trying to implement a typesafe pubsub

blov · · 339 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey guys, I was inspired by this <a href="https://medium.com/capital-one-developers/closures-are-the-generics-for-go-cb32021fb5b5" rel="nofollow">article</a> to try to create a typesafe pubsub with some other features, I threw together this gist to see what the API-Feel would be like, what do you think? Personally I think it is a fantastic way to get around the lack of generics.</p> <p><a href="https://gist.github.com/pborges/f44d13864a2c30a28be941349ad2a83e" rel="nofollow">https://gist.github.com/pborges/f44d13864a2c30a28be941349ad2a83e</a></p> <hr/>**评论:**<br/><br/>themissedsymphony: <pre><p>I&#39;m working on something similar <a href="https://github.com/lileio/pubsub" rel="nofollow">https://github.com/lileio/pubsub</a> but it has some reflection. I&#39;m reworking that a bit in the v1 branch though</p></pre>twek: <pre><p>The thing I&#39;m working on is for IOT so it has some wierd features.. I did reflection but it didn&#39;t feel right. What do you think of this API feel?</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

339 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传