CribbNotes CUI v1.0

blov · · 493 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi, everyone. I would like to announce the first release of CribbNotes CUI (<a href="https://github.com/jameycribbs/cribbnotes_cui" rel="nofollow">https://github.com/jameycribbs/cribbnotes_cui</a>). CribbNotes CUI is a simple, console-user-interface note taking application written in Go and using the awesome gocui library.</p> <p>CribbNotes CUI stores it&#39;s notes in json format for easy access outside the app. You can add new notes, edit existing notes, delete notes, and search notes. It is fairly simplistic, but I wanted to write something using gocui and I have a soft-spot for simple, text-based note apps, so here we are.</p> <p>I would greatly appreciate any feedback on the app, and especially the code. I have run everything through golint and govet, but I don&#39;t yet do a lot of Go, so constructive criticism on what I can do better is welcome.</p> <p>There is experimental vim support (albeit rudimentary at this point) for navigation and editing, that can be enabled by passing --vim as the last argument when running the executable. I have only tested this on linux.</p> <p>Enjoy and thanks for your time!</p> <p>Jamey Cribbs</p> <hr/>**评论:**<br/><br/>i_regret_most_of_it: <pre><p>I was mildly impressed by the screenshot so I went and <code>go get</code>&#39;d it.</p> <p>Some suggestions:</p> <ul> <li>Don&#39;t use panic for everything</li> <li>Use flag or maybe urfave/cli so people aren&#39;t lost when they run the binary</li> <li>It doesn&#39;t work for me on Ubuntu/xfce4-terminal:</li> </ul> <p>.</p> <pre><code> $ cribbnotes_cui ~/Documents/crib panic: (PopulateToc) error on SetCursor on toc view: invalid point goroutine 1 [running]: panic(0x581760, 0xc820012830) /usr/local/go/src/runtime/panic.go:481 +0x3e6 main.main() /home/alex/devel/go/src/github.com/jameycribbs/cribbnotes_cui/cribbnotes_cui.go:70 +0x906 </code></pre> <p>Edit: so with that last panic, it seems that if I am in tmux + split pane, it craps itself. Works fine otherwise. However gocui examples work fine in the same environment, so I think you are misusing gocui somewhere.</p> <p>But, there are tonnes of other panics. Such as scrolling down too far in vim mode (j j j j j) past the end of the document = panic. Again, avoid panic for ordinary errors, and prevent regular panics by doing things like bounds checks.</p></pre>jameycribbs: <pre><p>Thanks for the feedback! I will work on the things you mentioned.</p></pre>

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

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