home industries $projects docs hoff.kitchen metapages

cavemenu

A naive and simple text-based menu system written for Go.

Quality Status: Gold Master

Functionality Status: Complete

License: BSD 3-Clause

To support go2 I needed a terminal-based menu system. No no, nothing too fancy needed here, just something naive and dumb that gets the job done. Toggle some options? Yup. Collect user text input? Can do. Gimme a callback for the next selected menu? You got it. Anything else? Nah I'm good. The following menu types are available:

'n that's it. Want more? Go away. Ya ain't gettin' it. Option menus yield callbacks that can be checked by your application, which can then do behaviour based on it. If you want an example of a fully-functioning terminal game that uses all these menus, see the source code for go2.