skopeo/vendor/github.com/mattn/go-shellwords
Lokesh Mandvekar 6153a02cef
bump golang.org/x/net to v0.7.0
Resolves: CVE-2022-41723
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-41723

bumped golang to 1.17

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-03-24 10:06:32 +05:30
..
.travis.yml Bump github.com/containers/storage from 1.24.5 to 1.25.0 2021-02-03 12:46:11 +01:00
go.test.sh Bump github.com/containers/buildah from 1.8.4 to 1.11.4 2019-11-02 07:41:01 +01:00
LICENSE migrate to go modules 2019-06-21 13:58:19 +02:00
README.md Bump github.com/containers/storage from 1.24.5 to 1.25.0 2021-02-03 12:46:11 +01:00
shellwords.go Bump github.com/containers/storage from 1.32.1 to 1.32.2 2021-06-10 08:21:38 +00:00
util_posix.go Bump github.com/containers/storage from 1.24.5 to 1.25.0 2021-02-03 12:46:11 +01:00
util_windows.go Bump github.com/containers/storage from 1.24.5 to 1.25.0 2021-02-03 12:46:11 +01:00

go-shellwords

codecov Build Status PkgGoDev ci

Parse line as shell words.

Usage

args, err := shellwords.Parse("./foo --bar=baz")
// args should be ["./foo", "--bar=baz"]
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"]
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)