forgetful: Small note/cheat sheet application for your shell. Roast me?

agolangf · · 595 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>So, there are a couple of these around but had some extra time on my hands so I wrote my own to learn more about go (Im coming from a python-background and haven&#39;t had lots of experience with go). You can check it out here: <a href="https://github.com/gummiboll/forgetful">forgetful</a> and any suggestions are greatly appreciated!</p> <hr/>**评论:**<br/><br/>zettahash: <pre><ol> <li><p>Consider using named functions for defining your commands. It&#39;ll clean up your <code>main</code> and let you write tests for your commands. Structs like <code>cli.Command</code> have fields like <code>func(*Context)</code> but they don&#39;t always have to be anonymous. This applies to web apps as well when using <code>net/http</code>.</p></li> <li><p>Your readme mentions being able to clean up old cheatsheets which text files otherwise can&#39;t solve. Are you certain sqlite is the ideal solution?</p></li> <li><p>Even though you don&#39;t have any tests, thank you for linting your code on Travis CI.</p></li> <li><p><code>forgetful</code> is a little long compared to <code>cheat</code>. :P</p></li> </ol></pre>gummiboll: <pre><blockquote> <p>Consider using named functions for defining your commands. It&#39;ll clean up your main and let you write tests for your commands. Structs like cli.Command have fields like func(*Context) but they don&#39;t always have to be anonymous. This applies to web apps as well when using net/http.</p> </blockquote> <p>Thanks for pointing this out! main.go has gotten way to messy! I&#39;ll do this asap!</p> <blockquote> <p>Your readme mentions being able to clean up old cheatsheets which text files otherwise can&#39;t solve. Are you certain sqlite is the ideal solution?</p> </blockquote> <p>This could easily been done with like json files (and could also been done with regular textfiles to by checking when they where created), the main reason for using sqllite was actually that I wanted to play around with orm&#39;s in golang. :)</p> <p>That said, do you have any specific solution in mind?</p> <blockquote> <p>Even though you don&#39;t have any tests, thank you for linting your code on Travis CI.</p> </blockquote> <p>No tests.. yet :D</p> <blockquote> <p>forgetful is a little long compared to cheat. :P</p> </blockquote> <p>Hehe, yeah. True :D</p> <p>Thank you for your input!</p></pre>

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

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