yamlpatch

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: BSD-3-Clause Imports: 2 Imported by: 3 modules, 1 package

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 yamlpatch is a library for applying RFC6902 JSON patches to yaml documents. It leverages go-yaml v3's Node type to preserve comments, ordering, and most formatting.

Index

Constants

View Source
const (
	OperationAdd     = yamlpatch.OperationAdd
	OperationReplace = yamlpatch.OperationReplace
	OperationRemove  = yamlpatch.OperationRemove
	OperationMove    = yamlpatch.OperationMove
	OperationCopy    = yamlpatch.OperationCopy
	OperationTest    = yamlpatch.OperationTest
)

Variables

This section is empty.

Functions

func Apply

func Apply(originalBytes []byte, patch Patch) ([]byte, error)

Apply calls ApplyUsingYAMLLibrary using the "gopkg.in/yaml.v3" YAML library.

Types

type Operation

type Operation = yamlpatch.Operation

Operation represents a RFC6902 JSON Patch operation.

type Patch

type Patch = yamlpatch.Patch

type Path

type Path = yamlpatch.Path

Path represents a decoded JSON patch targeting a location within a document. Use ParsePath or UnmarshalText to construct a Path.

func MustParsePath

func MustParsePath(str string) Path

MustParsePath is like ParsePath but panics in case of invalid input.

func ParsePath

func ParsePath(str string) (Path, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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