argv
Go library to split command line string as arguments array using the bash syntax
About argv
Argv
Argv is a library for Go to split command line string into arguments array.
Documentation
Documentation can be found at Godoc
Example
func TestArgv(t *testing.T) {
args, err := Argv(" ls `echo /` | wc -l ", func(backquoted string) (string, error) {
return backquoted, nil
}, nil)
if err != nil {
t.Fatal(err)
}
expects := [][]string{
[]string{"ls", "echo /"},
[]string{"wc", "-l"},
}
if !reflect.DeepEqual(args, expects) {
t.Fatal(args)
}
}
LICENSE
MIT.
Frequently Asked Questions
What is argv?
argv is a Command Line library for the Go programming language. Go library to split command line string as arguments array using the bash syntax
How do I install argv?
Install argv with the Go module system using `go get cosiner/argv`. Check the repository for the current installation instructions.
What category does argv belong to?
argv is listed under Command Line, specifically Standard CLI.