command_parser

package
v7.0.0-beta.29+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

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 {
}

func (UnknownCommandError) Error

func (e UnknownCommandError) Error() string

Jump to

Keyboard shortcuts

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