Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - cosiner/argv

Contribute to cosiner/argv development by creating an account on GitHub.

Visit SiteGitHub - cosiner/argv

GitHub - cosiner/argv

Contribute to cosiner/argv development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

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(" 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.

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.