cli

package
v0.0.0-...-0f41625 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgList

type ArgList []string

type CLI

type CLI interface {
	Init(Env) error
	GenerateNewEnv(...string) Env
	CommandList() []Command
	ExecutionEngine(ArgList, Env) error
	ReadInput(Env) ArgList
	ChildCli(string, Env) CLI
	Loop() error
	HelloWorld()
}

type Command

type Command interface {
	Name() string
	Aliases() []string
	Description() string
	Match(string) bool
	Flags() []string
	ReadFlags([]string) (map[string][]string, error)
	Execute([]string) error
	Help() string
}

type Env

type Env interface {
	Prompt() Prompt
	ScriptsList() []Command
	FetchJSON(...string) error
	CommandsList() []Command
	WrapError(string, error) error
	History() []string
	Log(string) error
	Error(...string) error
}

type Prompt

type Prompt interface {
	Prompt() string
	Push(string)
	Pop() string
	Raw() []string
}

type Test_1

type Test_1 struct {
	Comm Command
	Prom Prompt
	Env  Env
	Cli  CLI
}

func NewTest1

func NewTest1(
	Comm Command,
	Prom Prompt,
	Env Env,
	Cli CLI,
) *Test_1

func (*Test_1) BasicTest001_TestAliasesMatch

func (T *Test_1) BasicTest001_TestAliasesMatch() *Test_1

Directories

Path Synopsis
v1
v2
v3

Jump to

Keyboard shortcuts

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