moby--moby/libnetwork/vendor/github.com/mattn/go-shellwords
Sebastiaan van Stijn f864421ead bump docker/docker to master and unfork dependencies
This patch updates all dependencies to match what is
used in moby/moby. Making the dependencies match
what is used in that repository makes sure we test
with the same version as libnetwork is later built
with in moby.

This also gets rid of some temporary forks that were
needed during the migration of Sirupsen/logrus to
sirupsen/logrus.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-25 17:26:25 +02:00
..
LICENSE bump docker/docker to master and unfork dependencies 2017-10-25 17:26:25 +02:00
README.md bump docker/docker to master and unfork dependencies 2017-10-25 17:26:25 +02:00
shellwords.go bump docker/docker to master and unfork dependencies 2017-10-25 17:26:25 +02:00
util_posix.go
util_windows.go

README.md

go-shellwords

Coverage Status Build Status

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)