A tool for customizing YAML flies
Usage:
yaml-tailor [file] [flags]
Flags:
-h, --help help for yaml-tailor
-s, --string stringArray a string override
-v, --value stringArray a value override
The application uses DJSON library syntax for interpreting string values and converting them to JSON objects and arrays. The same library is used for merging the interpreted values with elements of an existing YAML file.
The examples below demonstrate how an empty YAML file is populated with foo: bar
element.
Prerequisites:
$ go get github.com/moikot/yaml-tailor
$ echo '{}' > test.yml
$ yaml-tailor -v foo=bar test.yml
$ cat test.yml
Prerequisites:
$ echo '{}' > test.yml
$ docker run -d --rm -v $(pwd):/yml moikot/yaml-tailor -v foo=bar /yml/test.yml
$ cat test.yml