diff options
Diffstat (limited to 'vendor/github.com/mattn/go-shellwords/README.md')
-rw-r--r-- | vendor/github.com/mattn/go-shellwords/README.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/mattn/go-shellwords/README.md b/vendor/github.com/mattn/go-shellwords/README.md index e91902f40..bdd531918 100644 --- a/vendor/github.com/mattn/go-shellwords/README.md +++ b/vendor/github.com/mattn/go-shellwords/README.md @@ -2,7 +2,8 @@ [](https://codecov.io/gh/mattn/go-shellwords) [](https://travis-ci.org/mattn/go-shellwords) -[](http://godoc.org/github.com/mattn/go-shellwords) +[](https://pkg.go.dev/github.com/mattn/go-shellwords) +[](https://github.com/mattn/go-shellwords/actions) Parse line as shell words. @@ -14,6 +15,12 @@ args, err := shellwords.Parse("./foo --bar=baz") ``` ```go +envs, args, err := shellwords.ParseWithEnvs("FOO=foo BAR=baz ./foo --bar=baz") +// envs should be ["FOO=foo", "BAR=baz"] +// args should be ["./foo", "--bar=baz"] +``` + +```go os.Setenv("FOO", "bar") p := shellwords.NewParser() p.ParseEnv = true |