Documentation ¶
Index ¶
- func FilterManifest(ms string, selectResources string, ignoreResources string) (string, error)
- func IsLeafNode(node any) bool
- func ManifestDiff(a, b string, verbose bool) (string, error)
- func ManifestDiffWithRenameSelectIgnore(a, b, renameResources, selectResources, ignoreResources string, verbose bool) (string, error)
- func UnmarshalInlineYaml(obj map[string]any, targetPath string) (err error)
- func YAMLCmp(a, b string) string
- func YAMLCmpWithIgnore(a, b string, ignorePaths []string, ignoreYaml string) string
- type YAMLCmpReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterManifest ¶
FilterManifest selects and ignores subset from the manifest string
func IsLeafNode ¶
IsLeafNode reports whether the given node is a leaf, assuming internal nodes can only be maps or slices.
func ManifestDiffWithRenameSelectIgnore ¶
func ManifestDiffWithRenameSelectIgnore(a, b, renameResources, selectResources, ignoreResources string, verbose bool) (string, error)
ManifestDiffWithSelect checks the manifest differences with selected and ignored resources. The selected filter will apply before the ignored filter.
func UnmarshalInlineYaml ¶
UnmarshalInlineYaml tries to unmarshal string values in obj into YAML objects at a given targetPath. Side effect: this will mutate obj in place.
Types ¶
type YAMLCmpReporter ¶
type YAMLCmpReporter struct {
// contains filtered or unexported fields
}
YAMLCmpReporter is a custom reporter to generate tree based diff for YAMLs, used by cmp.Equal().
func (*YAMLCmpReporter) PopStep ¶
func (r *YAMLCmpReporter) PopStep()
PopStep implements interface to keep track of current path by popping a step out. of YAMLCmpReporter.path
func (*YAMLCmpReporter) PushStep ¶
func (r *YAMLCmpReporter) PushStep(ps cmp.PathStep)
PushStep implements interface to keep track of current path by pushing. a step into YAMLCmpReporter.path
func (*YAMLCmpReporter) Report ¶
func (r *YAMLCmpReporter) Report(rs cmp.Result)
Report implements interface to add diff path into YAMLCmpReporter.diffTree.
func (*YAMLCmpReporter) String ¶
func (r *YAMLCmpReporter) String() string
String returns a text representation of diff tree.