prompt

package
v0.0.0-...-d621206 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[CommandName]*Command{
	COMMAND_HELP: {
		Name:        COMMAND_HELP,
		Description: "Some help",
		Action:      printHelp,
	},
	COMMAND_EXIT: {
		Name:        COMMAND_EXIT,
		Description: "",
		Action:      nil,
	},
}

Functions

func Display

func Display()

Types

type Command

type Command struct {
	Name        CommandName
	Description string
	Action      func() error
}

type CommandName

type CommandName string
const (
	COMMAND_HELP CommandName = "help"
	COMMAND_EXIT CommandName = "exit"
)

Jump to

Keyboard shortcuts

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