Documentation
¶
Overview ¶
Package diff provides functions for comparing rendered manifests
Index ¶
- func ColorizeDiff(diff string, noColor bool) string
- func CreateDiff(a, b string, fromName, toName string) string
- func CreateSemanticDiff(targetRender, localRender, fromName, toName string, noColor bool) (*dyff.HumanReport, error)
- func FixGitHubDiffOutput(report string) string
- func PrintChangeSummary(report dyff.Report, isGitHub bool) error
- func RenderManifests(path string, values []string, opts options.CmdOptions) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeDiff ¶
ColorizeDiff adds simple ANSI colors to a diff string.
func CreateDiff ¶
CreateDiff generates a unified diff string between two text inputs.
func CreateSemanticDiff ¶ added in v0.13.0
func CreateSemanticDiff(targetRender, localRender, fromName, toName string, noColor bool) (*dyff.HumanReport, error)
CreateSemanticDiff uses a more complex but k8s object aware diff engine it is better suited for larger scale changes to a k8s resources
func FixGitHubDiffOutput ¶ added in v0.16.0
FixGitHubDiffOutput post-processes the dyff report output to ensure that document-level changes have the necessary +/- symbols for GitHub's diff syntax highlighting. dyff's "human" report format normally omits these symbols for the contents of added/removed documents.
func PrintChangeSummary ¶ added in v0.16.0
PrintChangeSummary prints a concise summary of changes categorized by type
func RenderManifests ¶
RenderManifests will render a Helm Chart or build a Kustomization and return the rendered manifests as a string
Types ¶
This section is empty.