cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd func()

func (Cmd) Resolve

func (c Cmd) Resolve(...string)

type CmdMap

type CmdMap map[string]interface{}

type CmdWithParam

type CmdWithParam func(...string)

func (CmdWithParam) Resolve

func (c CmdWithParam) Resolve(t ...string)

type Completer

type Completer interface {
	Complete(...string) []prompt.Suggest
}

type Resolver

type Resolver interface {
	Resolve(...string)
}

type SubCmdResolver

type SubCmdResolver struct {
	// contains filtered or unexported fields
}

func NewSubCmdResolver

func NewSubCmdResolver(cmdMap CmdMap, suggests Suggest) *SubCmdResolver

func (*SubCmdResolver) Complete

func (r *SubCmdResolver) Complete(t ...string) []prompt.Suggest

func (*SubCmdResolver) Resolve

func (r *SubCmdResolver) Resolve(token ...string)

type Suggest

type Suggest map[string]string

Jump to

Keyboard shortcuts

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