cmdline

package
v1.13.10 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedFeatureSubCmd       = errors.New("unsupported feature: sub command")
	ErrUnsupportedFeatureMultiCmds    = errors.New("unsupported feature: multi commands")
	ErrInvalidEscapeChar              = errors.New("invalid escape char")
	ErrIncompleteStringExpectQuot     = errors.New("incomplete string, expect \"")
	ErrIncompleteStringExpectSquot    = errors.New("incomplete string, expect '")
	ErrIncompleteStringExpectBacktick = errors.New("incomplete string, expect ` or |")
)

Functions

func Find

func Find(str string, typeMask uint32) (n int)

func Skip

func Skip(str string, typeMask uint32) string

Types

type Parser

type Parser struct {
	ExecSub func(code string) (string, error)
	Escape  func(c byte) string
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) ParseCmd

func (p *Parser) ParseCmd(cmdline string) (cmd []string, err error)

func (*Parser) ParseCode

func (p *Parser) ParseCode(code string) (cmd []string, codeNext string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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