go.mod: github.com/mattn/go-shellwords v1.0.11
adds go module support, among others Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
10
vendor/github.com/mattn/go-shellwords/README.md
generated
vendored
10
vendor/github.com/mattn/go-shellwords/README.md
generated
vendored
@ -1,7 +1,9 @@
|
||||
# go-shellwords
|
||||
|
||||
[](https://coveralls.io/r/mattn/go-shellwords?branch=master)
|
||||
[](https://codecov.io/gh/mattn/go-shellwords)
|
||||
[](https://travis-ci.org/mattn/go-shellwords)
|
||||
[](https://pkg.go.dev/github.com/mattn/go-shellwords)
|
||||
[](https://github.com/mattn/go-shellwords/actions)
|
||||
|
||||
Parse line as shell words.
|
||||
|
||||
@ -12,6 +14,12 @@ args, err := shellwords.Parse("./foo --bar=baz")
|
||||
// args should be ["./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()
|
||||
|
Reference in New Issue
Block a user