commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JSONtoYAML = jsonToYaml{
				// contains filtered or unexported fields
	}
	YAMLtoJSON = yamlToJson{
				// contains filtered or unexported fields
	}
)

Functions

func NewBase

func NewBase(name, desc string) base

Types

type Category

type Category struct {
	Title       string
	Prompt      string
	Subcommands []Command
	Cursor      int
}

func NewCategory

func NewCategory(title, prompt string, subcommands []Command) *Category

func (*Category) CursorDown

func (c *Category) CursorDown()

func (*Category) CursorUp

func (c *Category) CursorUp()

func (*Category) Selected

func (c *Category) Selected() Command

type Command

type Command interface {
	Name() string
	Exec(string) (string, error)
}

Jump to

Keyboard shortcuts

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