go-sep replays published http events to subscribers and I'm looking for codre review and advice

xuanbao · · 441 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi there!</p> <p>I&#39;m just getting into <code>go</code> and would like some more experienced folks to help point me down a road to success.</p> <p><code>go-sep</code> exists to replay events from a publisher to subscribers within a trusted environment with plain HTTP transport.</p> <ul> <li><a href="https://github.com/chuyskywalker/go-sep" rel="nofollow">https://github.com/chuyskywalker/go-sep</a></li> </ul> <p>I&#39;ve searched for and read through other review ask threads in this subreddit to see what I might glean before writing my own. Learned about <code>go vet</code> and <code>golint</code> -- even got myself a 100% passing score on <a href="https://goreportcard.com/report/github.com/chuyskywalker/go-sep" rel="nofollow">Go Report Card</a>.</p> <p>I feel this code is likely weak are in the complete and utter lack of tests and the fact that it sits entirely in <code>main.go</code>. How would you slice this program up? Would you even bother? If you wanted to have <code>TestXXX()</code> methods about, where would you take this code?</p> <p>For a more specific question, I have no idea if what I&#39;ve done with <code>requestMessage</code> is a good way to (for lack of a better term) &#34;serialize&#34; an http event to be repeated.</p> <p>I&#39;m also open any other feed back because, well, you don&#39;t know what you don&#39;t know.</p> <p>Thanks!</p>

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

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