Sign inSign up

moikot/yaml-tailor

By moikot

•Updated over 5 years ago

Image
0

763

moikot/yaml-tailor repository overview

⁠yaml-tailor

CI Go Report Card

A tool for customizing YAML flies

⁠Run

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.

⁠Run as a standalone app

Prerequisites:

$ go get github.com/moikot/yaml-tailor
$ echo '{}' > test.yml
$ yaml-tailor -v foo=bar test.yml
$ cat test.yml
⁠Run as a Docker container

Prerequisites:

$ echo '{}' > test.yml
$ docker run -d --rm -v $(pwd):/yml moikot/yaml-tailor -v foo=bar /yml/test.yml
$ cat test.yml

Tag summary

Content type

Image

Digest

Size

2.6 MB

Last updated

over 5 years ago

docker pull moikot/yaml-tailor