merge

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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