delve/vendor/github.com/cosiner/argv/argv.go
2020-06-24 10:00:37 -07:00

11 lines
507 B
Go

// Package argv parse command line string into arguments array using the bash syntax.
package argv
// Argv split cmdline string as array of argument array by the '|' character.
//
// The parsing rules is same as bash. The environment variable will be replaced
// and string surround by '`' will be passed to reverse quote parser.
func Argv(cmdline string, backquoteExpander, stringExpander Expander) ([][]string, error) {
return NewParser(NewScanner(cmdline), backquoteExpander, stringExpander).Parse()
}