Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge(files []git.FileContent) ([]byte, error)
Merge evaluates one or more FileContent values and merges them using Jsonnet's + operator applied left-to-right, returning canonical JSON.
Files may be plain JSON (.json) or Jsonnet (.jsonnet); both are valid Jsonnet. Each file is identified by its Path field, which is used as the virtual import key. At least one FileContent value must be provided.
Merge performs a shallow top-level merge: right-hand fields overwrite left-hand fields at the top level. Deep merging of nested objects requires the overlay Jsonnet file to use the +: operator on those fields.
The MemoryImporter provides isolation: Jsonnet files cannot import from the real filesystem or network — only paths provided in files are importable. Error values may contain caller-supplied path strings.
Types ¶
This section is empty.