command_parser

package
v7.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailed = errors.New("command failed")
View Source
var ParseErr = errors.New("incorrect type for arg")

Functions

This section is empty.

Types

type CommandParser

type CommandParser struct {
	Config *configv3.Config
	UI     *ui.UI
}

func NewCommandParser

func NewCommandParser() (CommandParser, error)

func (*CommandParser) ParseCommandFromArgs

func (p *CommandParser) ParseCommandFromArgs(ui *ui.UI, args []string) (int, error)

type DisplayUsage

type DisplayUsage interface {
	DisplayUsage()
}

type TriggerLegacyMain

type TriggerLegacyMain interface {
	LegacyMain()
	error
}

type UI

type UI interface {
	DisplayError(err error)
	DisplayWarning(template string, templateValues ...map[string]interface{})
	DisplayText(template string, templateValues ...map[string]interface{})
	FlushDeferred()
}

type UnknownCommandError

type UnknownCommandError struct {
	CommandName string
	// contains filtered or unexported fields
}

func (UnknownCommandError) Error

func (e UnknownCommandError) Error() string

func (*UnknownCommandError) Suggest

func (e *UnknownCommandError) Suggest(pluginCommandNames []string)

Jump to

Keyboard shortcuts

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