diffsource

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string

Kind describes how a diff source should be resolved.

const (
	KindAuto     Kind = ""
	KindPath     Kind = "path"
	KindRevision Kind = "revision"
	KindWorktree Kind = "worktree"
)

type MaterializedPlan

type MaterializedPlan struct {
	ConfigRoot string
	LeftPath   string
	RightPath  string
	LeftLabel  string
	RightLabel string
}

MaterializedPlan is a diff plan with both sources available as filesystem paths.

type Plan

type Plan struct {
	ConfigRoot string
	Left       Source
	Right      Source
}

Plan describes the two materialized inputs and the config root for a diff run.

func ResolvePlan

func ResolvePlan(args []string, cwd string) (*Plan, error)

ResolvePlan maps CLI diff arguments to concrete diff sources.

func (*Plan) Materialize

func (p *Plan) Materialize(ctx context.Context) (*MaterializedPlan, func(), error)

Materialize returns filesystem paths for both sources and one cleanup function.

type Source

type Source struct {
	Kind     Kind
	Raw      string
	RepoRoot string
}

Source is one side of a rendered manifest diff.

func (Source) Label

func (s Source) Label() string

Label returns a human-readable source label for reports.

func (Source) Materialize

func (s Source) Materialize(ctx context.Context) (string, func(), error)

Materialize returns a filesystem path for the source and an optional cleanup function.

Jump to

Keyboard shortcuts

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