Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func RenderByCommand ¶ added in v0.48.0
RenderByCommand converts the given objects into yaml and then runs the command to compare them.
func RenderPrimitiveValue ¶
Types ¶
type Node ¶
type Option ¶
type Option func(*differ)
func WithCompareNumberAndNumericString ¶
func WithCompareNumberAndNumericString() Option
WithCompareNumberAndNumericString configures differ to compare a number with a numeric string. Differ parses the string to number before comparing their values. e.g. 1.5 == "1.5"
func WithEquateEmpty ¶
func WithEquateEmpty() Option
WithEquateEmpty configures differ to consider all maps/slides with a length of zero and nil to be equal.
func WithIgnoreAddingMapKeys ¶
func WithIgnoreAddingMapKeys() Option
WithIgnoreAddingMapKeys configures differ to ignore all map keys that were added to the second object and missing in the first one.
func WithIgnoreConfig ¶ added in v0.43.0
WithIgnoreConfig configures ignored fields.
type PathStep ¶
type PathStep struct { Type PathStepType MapIndex string SliceIndex int }
type PathStepType ¶
type PathStepType string
const ( MapIndexPathStep PathStepType = "MapIndex" SliceIndexPathStep PathStepType = "SliceIndex" )
type RenderOption ¶
type RenderOption func(*Renderer)
func WithLeftPadding ¶
func WithLeftPadding(p int) RenderOption
func WithMaskPath ¶
func WithMaskPath(prefix string) RenderOption
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(opts ...RenderOption) *Renderer
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func DiffStructureds ¶ added in v0.48.0
DiffStructureds calulates the diff between non-k8s manifests. If you compare k8s manifests, use DiffUnstructureds instead.
func DiffUnstructureds ¶
func DiffUnstructureds(x, y unstructured.Unstructured, key string, opts ...Option) (*Result, error)
DiffUnstructureds calculates the diff between two unstructured objects. If you compare non-k8s manifests, use DiffStructureds instead.