<p>For an upcoming tool I want <a href="http://i.ytimg.com/vi/HZLt2KT4aLA/maxresdefault.jpg">an in-terminal GUI</a> (not <em>exactly</em> like it, just to show roughly what I even mean by "terminal GUI" ;)</p>
<p>Y'know, arrow-key-navigable menus, perhaps a list view / master-detail split view..</p>
<p>Been away from the Go ecosystem for some ~3 years now so I'm a bit out of touch with all the neat packages that have been written.</p>
<p>Anyone experimented with any such packages, assuming there <em>are</em> any? Ideally tested with both win and *nix..</p>
<p>Any recommendations / experiences to share?</p>
<hr/>**评论:**<br/><br/>ChristophBerger: <pre><p>Funny coincidence - I planned my next blog post to be about TUI libs.I haven't done research yet, but these come to mind:</p>
<p>jroimartin/gocui</p>
<p>nsf/termbox-go</p>
<p>gdamore/tcell</p>
<p>gizak/termui</p>
<p>(All hosted on GitHub)</p>
<hr/>
<p>Edit: CUI -> TUI</p></pre>Raekel: <pre><p>Will you post the post on this subreddit? I'm interested in what you have to say. A good overview would be great.</p></pre>ChristophBerger: <pre><p>Sure I'll do!</p></pre>meta_leap: <pre><p>Thx, looking great, especially gocui at first glance! =)</p></pre>titpetric: <pre><p>+1 for gizak/termui - it's used in <a href="https://github.com/bcicen/ctop" rel="nofollow">ctop</a>.</p></pre>Chillance: <pre><p>Yes, as <a href="/u/nagvx" rel="nofollow">/u/nagvx</a> said, termui and gocui use termbox underneath. Anyway, will you also talk about how well they are in regards of positioning and resizing panels? When I did <a href="https://github.com/Chillance/sgo" rel="nofollow">https://github.com/Chillance/sgo</a> I ended up using termui because it had better "window" management in that regard, although it's not perfect. I was hoping to use a TUI which was flexible both width and height wise when it came to the panels/widgets you are using inside the terminal, so when you resize the terminal, everything inside just adapts nicely.</p></pre>ChristophBerger: <pre><p>I plan to define a very simple test application that includes a set of features, e.g. input, output, panels, etc. and then try to implement this application with some of the popular TUI libraries. </p>
<p>Don't expect too much though. My time is limited, and thus the feature set will certainly be a very basic one, just enough to get a taste of each of the libraries.</p></pre>driusan: <pre><p>Is there any chance I could convince you to include a matrix of which libs support which OSes in your blog post? The cross platform compatibility of Go is one of my favourite parts of the language, but I've pretty much given up finding something that works well across the platforms I use when it comes to terminal libs..</p></pre>ChristophBerger: <pre><p>Good point! But for this I have to rely on the data that the lib owners provide. I can only test on macOS and maybe also on Linux if time permits. I have no Windows around, nor any other OSes.</p></pre>nagvx: <pre><p>This is a bit misleading, as both termui and gocui use termbox underneath. The two leading low-level libraries available (afaik) are tcell and termbox.</p></pre>markole: <pre><p>The term you are searching for is <a href="https://en.wikipedia.org/wiki/Text-based_user_interface" rel="nofollow">TUI</a>. </p></pre>0xjnml: <pre><p><a href="https://github.com/cznic/wm" rel="nofollow">wm</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传