istio: Index | Files

package compare

import ""


Package Files


func FilterManifest Uses

func FilterManifest(ms string, selectResources string, ignoreResources string) (string, error)

FilterManifest selects and ignores subset from the manifest string

func IsLeafNode Uses

func IsLeafNode(node interface{}) bool

IsLeafNode reports whether the given node is a leaf, assuming internal nodes can only be maps or slices.

func ManifestDiff Uses

func ManifestDiff(a, b string, verbose bool) (string, error)

func ManifestDiffWithRenameSelectIgnore Uses

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 Uses

func UnmarshalInlineYaml(obj map[string]interface{}, targetPath string) (err error)

UnmarshalInlineYaml tries to unmarshal string values in obj into YAML objects at a given targetPath. Side effect: this will mutate obj in place.

func YAMLCmp Uses

func YAMLCmp(a, b string) string

YAMLCmp compares two yaml texts, return a tree based diff text.

func YAMLCmpWithIgnore Uses

func YAMLCmpWithIgnore(a, b string, ignorePaths []string, ignoreYaml string) string

YAMLCmpWithIgnore compares two yaml texts, and ignores paths in ignorePaths.

type YAMLCmpReporter Uses

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 Uses

func (r *YAMLCmpReporter) PopStep()

PopStep implements interface to keep track of current path by popping a step out. of YAMLCmpReporter.path

func (*YAMLCmpReporter) PushStep Uses

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 Uses

func (r *YAMLCmpReporter) Report(rs cmp.Result)

Report implements interface to add diff path into YAMLCmpReporter.diffTree.

func (*YAMLCmpReporter) String Uses

func (r *YAMLCmpReporter) String() string

String returns a text representation of diff tree.

Package compare imports 13 packages (graph) and is imported by 1 packages. Updated 2020-08-01. Refresh now. Tools for package owners.