mergekey

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mergekey supplies the standard shallow Merge-Key algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = libyaml.MergeKeyConfig

Config controls merge recognition, repeated directives, and conflicts.

type Option

type Option func(*Plugin)

Option configures a plugin.

func WithConflicts

func WithConflicts(policy string) Option

WithConflicts selects first, last, or error across target and sources.

func WithDisable

func WithDisable(disable bool) Option

WithDisable disables all merging when true.

func WithMultiple

func WithMultiple(policy string) Option

WithMultiple selects error or combine for repeated merge directives.

type Plugin

type Plugin struct {
	libyaml.DefaultMergeKey
}

Plugin implements the standard Merge-Key algorithm.

func New

func New(opts ...Option) *Plugin

New creates a plugin. Invalid options are rejected by yaml.WithPlugin.

func NewFromYAML

func NewFromYAML(cfg map[string]any) (*Plugin, error)

NewFromYAML creates a plugin from a named implementation's configuration.

Jump to

Keyboard shortcuts

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