patchpreview

package
v0.20.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KindAdded    = "ADDED"
	KindModified = "MODIFIED"
	KindRemoved  = "REMOVED"
	KindRenamed  = "RENAMED"
)

Variables

This section is empty.

Functions

func Summarize added in v0.20.4

func Summarize(out *termenv.Output, entries []Entry, maxWidth int)

Summarize writes a colored diff summary to out. Removed files under removed directories are folded into a single entry. Does nothing if entries is empty.

func SummarizeString

func SummarizeString(entries []Entry, maxWidth int) string

SummarizeString returns a plain-text diff summary (no ANSI colors).

Types

type Entry added in v0.20.4

type Entry struct {
	Path    string
	OldPath string
	Kind    string
	Added   int
	Removed int
}

Jump to

Keyboard shortcuts

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