cmdline

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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