order

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncOrder

func SyncOrder(from, to *yaml.RNode) error

SyncOrder recursively sorts the map node keys in 'to' node to match the order of map node keys in 'from' node at same tree depth, additional keys are moved to the end Field order might be altered due to round-tripping in arbitrary functions. This functionality helps to retain the original order of fields to avoid unnecessary diffs.

func VisitElements

func VisitElements(from, to *yaml.RNode, fn func(fNode, tNode *yaml.RNode) error) error

VisitElements calls fn for each element in a SequenceNode. Returns an error for non-SequenceNodes

func VisitFields

func VisitFields(from, to *yaml.RNode, fn func(fNode, tNode *yaml.MapNode) error) error

VisitFields calls fn for each field in the RNode. Returns an error for non-MappingNodes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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