Help us shape the future of Go! Take the 2026 Go Developer Survey

cmp

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleUnstructuredReporter

type SimpleUnstructuredReporter struct {
	// contains filtered or unexported fields
}

SimpleUnstructuredReporter is a simple reporter for Unstructured objects that only records differences detected during comparison, in a diff-like format.

func (*SimpleUnstructuredReporter) PopStep

func (r *SimpleUnstructuredReporter) PopStep()

func (*SimpleUnstructuredReporter) PushStep

func (r *SimpleUnstructuredReporter) PushStep(ps cmp.PathStep)

func (*SimpleUnstructuredReporter) Report

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

Report writes a diff entry if rs is not equal. In the format of:

.spec.replicas
-3
+1

.spec.template.spec.containers.[0].command.[6]
---deleted=true

.spec.template.spec.containers.[0].env.[?->1]
+map[name:ADDED]

func (*SimpleUnstructuredReporter) String

func (r *SimpleUnstructuredReporter) String() string

String returns the diff entries joined together with newline, trimmed from spaces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL