debian-forge-composer/vendor/github.com/mattn/go-shellwords
Tomáš Hozza 625b1578fa Port osbuild/images v0.33.0 with dot-notation to composer
Update the osbuild/images to the version which introduces "dot notation"
for distro release versions.

 - Replace all uses of distroregistry by distrofactory.
 - Delete local version of reporegistry and use the one from the
   osbuild/images.
 - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single
   `createTestWeldrAPI()` function`.
 - store/fixture: rework fixtures to allow overriding the host distro
   name and host architecture name. A cleanup function to restore the
   host distro and arch names is always part of the fixture struct.
 - Delete `distro_mock` package, since it is no longer used.
 - Bump the required version of osbuild to 98, because the OSCAP
   customization is using the 'compress_results' stage option, which is
   not available in older versions of osbuild.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
..
.travis.yml Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
go.test.sh Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
LICENSE Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
README.md Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
shellwords.go Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
util_posix.go Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +01:00
util_windows.go Port osbuild/images v0.33.0 with dot-notation to composer 2024-01-26 11:32:34 +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)