Documentation
¶
Overview ¶
Package patch applies RFC 6902 JSON Patch operations to a YAML release tree.
The patch itself is applied by a standard JSON Patch library, so serialization to JSON is required — which drops YAML custom tags (e.g. !lock), comments and key order. Those are restored from the original tree afterwards via yml.CopyMetadata. It also exposes a few node-level setters used for built-in transforms that must run before the JSON round-trip.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Op ¶
type Op struct {
Op string `json:"op" yaml:"op"`
Path string `json:"path" yaml:"path"`
From string `json:"from,omitempty" yaml:"from,omitempty"`
Value any `json:"value,omitempty" yaml:"value,omitempty"`
}
Op is a single RFC 6902 operation. Value is an arbitrary JSON value (set for add/replace); From is only set for move/copy.
Click to show internal directories.
Click to hide internal directories.