patchpreview

package
v0.19.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SummarizeString

func SummarizeString(ctx context.Context, rawPatch string, changeset Changeset) (string, error)

Types

type Changeset

type Changeset interface {
	AddedPaths(context.Context) ([]string, error)
	RemovedPaths(context.Context) ([]string, error)
}

type File

type File interface {
	Contents(context.Context) (string, error)
}

type PatchPreview

type PatchPreview struct {
	Patch       *diffparser.Diff
	AddedDirs   []string
	RemovedDirs []string
}

func New

func New(ctx context.Context, rawPatch string, changeset Changeset) (*PatchPreview, error)

func (*PatchPreview) Summarize

func (preview *PatchPreview) Summarize(out *termenv.Output, maxWidth int) error

Jump to

Keyboard shortcuts

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