podman/vendor/github.com/mattn/go-shellwords
dependabot-preview[bot] 86be569961 build(deps): bump github.com/containers/storage from 1.15.8 to 1.16.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.8 to 1.16.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.15.8...v1.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-19 11:40:53 +01:00
..
.travis.yml build(deps): bump github.com/containers/storage from 1.15.5 to 1.15.7 2020-01-23 03:49:20 -05:00
LICENSE migrate to go-modules 2019-06-24 13:20:59 +02:00
README.md build(deps): bump github.com/containers/storage from 1.15.5 to 1.15.7 2020-01-23 03:49:20 -05:00
go.mod build(deps): bump github.com/containers/storage from 1.15.7 to 1.15.8 2020-02-03 13:51:31 +01:00
go.test.sh Update c/image to v4.0.1 and buildah to 1.11.3 2019-10-04 20:18:23 +02:00
shellwords.go build(deps): bump github.com/containers/storage from 1.15.7 to 1.15.8 2020-02-03 13:51:31 +01:00
util_posix.go build(deps): bump github.com/containers/storage from 1.15.8 to 1.16.0 2020-02-19 11:40:53 +01:00
util_windows.go build(deps): bump github.com/containers/storage from 1.15.8 to 1.16.0 2020-02-19 11:40:53 +01:00

README.md

go-shellwords

codecov Build Status GoDoc

Parse line as shell words.

Usage

args, err := shellwords.Parse("./foo --bar=baz")
// args should be ["./foo", "--bar=baz"]
os.Setenv("FOO", "bar")
p := shellwords.NewParser()
p.ParseEnv = true
args, err := p.Parse("./foo $FOO")
// args should be ["./foo", "bar"]
p := shellwords.NewParser()
p.ParseBacktick = true
args, err := p.Parse("./foo `echo $SHELL`")
// args should be ["./foo", "/bin/bash"]
shellwords.ParseBacktick = true
p := shellwords.NewParser()
args, err := p.Parse("./foo `echo $SHELL`")
// args should be ["./foo", "/bin/bash"]

Thanks

This is based on cpan module Parse::CommandLine.

License

under the MIT License: http://mattn.mit-license.org/2017

Author

Yasuhiro Matsumoto (a.k.a mattn)