{"modulePath":"github.com/codefresh-io/argo-workflows","version":"v0.4.7","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package diff\n\n## Functions\n\n```go\nfunc RemoveMapFields(config, live map[string]interface{}) map[string]interface{}\n```\nRemoveMapFields remove all non-existent fields in the live that don't exist in the config\n\n## Types\n\n```go\ntype DiffResult struct {\n\tDiff     gojsondiff.Diff\n\tModified bool\n}\n```\n\n```go\nfunc Diff(config, live *unstructured.Unstructured) *DiffResult\n```\nDiff performs a diff on two unstructured objects. If the live object happens to have a \"kubectl.kubernetes.io/last-applied-configuration\", then perform a three way diff.\n\n```go\nfunc ThreeWayDiff(orig, config, live *unstructured.Unstructured) *DiffResult\n```\nThreeWayDiff performs a diff with the understanding of how to incorporate the last-applied-configuration annotation in the diff.\n\n```go\nfunc TwoWayDiff(config, live *unstructured.Unstructured) *DiffResult\n```\nTwoWayDiff performs a normal two-way diff between two unstructured objects. Ignores extra fields in the live object.\n\n```go\nfunc (d *DiffResult) ASCIIFormat(left *unstructured.Unstructured, formatOpts formatter.AsciiFormatterConfig) (string, error)\n```\nASCIIFormat returns the ASCII format of the diff\n\n```go\ntype DiffResultList struct {\n\tDiffs    []DiffResult\n\tModified bool\n}\n```\n\n```go\nfunc DiffArray(configArray, liveArray []*unstructured.Unstructured) (*DiffResultList, error)\n```\nDiffArray performs a diff on a list of unstructured objects. Objects are expected to match environments\n\n","path":"github.com/codefresh-io/argo-workflows/util/diff","name":"diff","synopsis":"","isRedistributable":true}
