Documentation ¶
Overview ¶
Package butanex contains a demo of how to merge multiple butane YAML files together.
At this stage its more a demo of the challenges and corner cases for building a single Butane YAML file from a collection of files and demonstrating the ambiguity in how to handle overlapping keys between two files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { FilesDir string ResolvePath []string DefaultOverWrite bool Overwrite []string Append []string }
Options configure merge behavior for a given key within a YAML mapping node (ie a struct field).
Each of the slice fields (ResolvePath, Overwrite, Append) should contain 0 or more patterns to apply this behavior to specific keys in a given YAML object. Each pattern is a string that matches a context path for example `$.storage.files.path`. A pattern can be relative or absolute. A relative pattern matches any context path with the same suffix. An absolute pattern matches the whole context key. Precedence for patterns is absolute, then relative then default.