yamltools

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package yamltools provides functions for handling YAML nodes, such as copying comments, applying comments, and diffing YAML documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyComments

func ApplyComments(dstNode *yaml.Node, path string, dstPaths map[string]*yaml.Node)

ApplyComments applies the copied comments to the target document.

func CopyComments

func CopyComments(srcNode, dstNode *yaml.Node, path string, dstPaths map[string]*yaml.Node)

CopyComments updates the comments in dstNode considering the structure of whitespace.

func DiffYAMLs

func DiffYAMLs(original, modified []byte) ([]byte, error)

DiffYAMLs compares two YAML documents and outputs the differences.

Types

This section is empty.

Jump to

Keyboard shortcuts

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