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

differ

package
v1.16.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSame

func AreSame[T Resource](r1, r2 T) bool

AreSame returns true if the resources have the same functional spec.

Types

type LocalRemoteResources

type LocalRemoteResources[T Resource] struct {
	Local  []T
	Remote []T
}

type Resource

type Resource interface {
	componentsapi.Component | subapi.Subscription
	meta.Resource
}

Resource is a generic type constraint.

type Result

type Result[T Resource] struct {
	Deleted []T
	Updated []T
	Created []T
}

func Diff

func Diff[T Resource](resources *LocalRemoteResources[T]) *Result[T]

Diff returns the difference between the local and remote resources of the given kind.

Jump to

Keyboard shortcuts

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