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

package shellwords

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

Index

Package Files

shellwords.go util_posix.go

Variables

var (
    ParseEnv      bool = false
    ParseBacktick bool = false
)

func Parse Uses

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

func ParseWithEnvs Uses

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

type Parser Uses

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 Uses

func NewParser() *Parser

func (*Parser) Parse Uses

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

func (*Parser) ParseWithEnvs Uses

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

Package shellwords imports 7 packages (graph) and is imported by 588 packages. Updated 2021-01-17. Refresh now. Tools for package owners.