menu

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 10 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

menu

Console menu

Documentation

Index

Constants

View Source
const (
	SELECT = "Select" // for Prompt()
	MARK   = "("      // default option selected rune
	BUG    = "Ж"
	GT     = ">"
	MARKED = -1
	ITEM   = -2
	EXIT   = "\x00"
)

Variables

View Source
var (
	Std = os.Stderr
)

Functions

func BugGtOut

func BugGtOut() (bug string, gt string, std io.Writer)

get color dependents

func IsAnsi

func IsAnsi() (ok bool)
func Menu(def rune,
	keyEnter,
	exitOnTypo bool,
	items ...MenuFunc,
)

Console menu

func NoColor

func NoColor() bool

no color need

func PressAnyKey

func PressAnyKey(s string, d time.Duration)

func Prompt

func Prompt(int, rune) string

helper for prompt `Select`

Types

type MenuFunc func(int, rune) string

type Static

type Static string

func (Static) Prompt

func (s Static) Prompt(int, rune) string

helper for static prompt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址