go-shellwords – github.com/mattn/go-shellwords Index | Files

package shellwords

import "github.com/mattn/go-shellwords"

Index

Variables

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)

Source Files

shellwords.go util_posix.go

Version
v1.0.12 (latest)
Published
Jun 4, 2021
Platform
darwin/amd64
Imports
7 packages
Last checked
3 days ago

Tools for package owners.