shellwords

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: 0BSD, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ParseEnv      bool = false
	ParseBacktick bool = false
)

Functions

func Parse

func Parse(line string) ([]string, error)

func ParseWithEnvs

func ParseWithEnvs(line string) (envs []string, args []string, err error)

Types

type Parser

type Parser struct {
	ParseEnv      bool
	ParseBacktick bool
	Position      int
	Dir           string

	// If ParseEnv is true, use this for getenv.
	// If nil, use os.Getenv.
	Getenv func(string) string
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(line string) ([]string, error)

func (*Parser) ParseWithEnvs

func (p *Parser) ParseWithEnvs(line string) (envs []string, args []string, err error)

Jump to

Keyboard shortcuts

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