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

diff

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffsToJSON

func DiffsToJSON(diffs []*ManifestDiff, fileName string, ref string) string

func DiffsToPatch

func DiffsToPatch(diffs []*ManifestDiff, fileName string) string

func DiffsToPrettyPrint

func DiffsToPrettyPrint(diffs []*ManifestDiff, filename string) string

Types

type JSONOutput

type JSONOutput struct {
	File  string          `json:"file"`
	Ref   string          `json:"ref"`
	Diffs []*ManifestDiff `json:"diffs"`
}

type ManifestDiff

type ManifestDiff struct {
	Type    string `json:"type"`
	Text    string `json:"text"`
	Line    int    `json:"line"`
	OldLine int    `json:"old_line"`
	NewLine int    `json:"new_line"`

	ResourceKind       string `json:"resource_kind,omitempty"`
	ResourceName       string `json:"resource_name,omitempty"`
	ResourceNamespace  string `json:"resource_namespace,omitempty"`
	ResourceAPIVersion string `json:"resource_api_version,omitempty"`
}

func CalculateDiff added in v1.8.1

func CalculateDiff(a, b string) ([]*ManifestDiff, bool)

func FilterDiffs

func FilterDiffs(diffs []*ManifestDiff, verbosityLevel string, chunkSize int) []*ManifestDiff

Jump to

Keyboard shortcuts

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