merge

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package merge assembles configuration fragments from left to right in a new tree. It removes duplicate lines and recursively merges sections. A slot with different values is a conflict. Strict mode reports an Error and keeps the first value. Lenient mode reports a Warning and keeps the last value. A schema List slot instead unions values without a diagnostic. Merge does not run a commit check.

Merge treats each non-keyed ZeroToOne definition as one slot per level, regardless of value. Therefore, "router bgp 65000" and "router bgp 65001" conflict. Remediate does not use this extension because it handles the same difference as Remove and Add operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(
	s *schema.Schema,
	policy diag.Policy,
	parts ...*tree.Config,
) (*tree.Config, *diag.Diagnostics)

Merge folds parts in order into a new tree bound to s without modifying its inputs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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