yaml-tailor

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 3 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL