1
0
mirror of https://github.com/beego/bee.git synced 2024-11-14 22:10:55 +00:00
bee/vendor/github.com/cosiner/argv
2019-04-15 16:43:01 +02:00
..
argv.go Update vendors 2018-10-13 21:45:53 +08:00
cmd.go Update vendors 2018-10-13 21:45:53 +08:00
LICENSE Update vendors 2018-10-13 21:45:53 +08:00
parser.go Update vendors 2018-10-13 21:45:53 +08:00
README.md Updated vendor 2019-04-15 16:43:01 +02:00
scanner.go Update vendors 2018-10-13 21:45:53 +08:00

Argv

GoDoc Build Status Coverage Status Go Report Card

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.Argv([]rune(" ls   `echo /`   |  wc  -l "), os.Environ(), argv.Run)
	if err != nil {
	    t.Fatal(err)
	}
	expects := [][]string{
	    []string{"ls", "/"},
	    []string{"wc", "-l"},
	}
	if !reflect.DeepDqual(args, expects) {
	    t.Fatal(args)
	}
}

LICENSE

MIT.