internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(ctx context.Context, opts PackOptions) (*txtar.Archive, []string, error)

func PrintDiff

func PrintDiff(w io.Writer, diff FileDiff, showContent bool)

func Unpack

func Unpack(archive *txtar.Archive, opts UnpackOptions) error

Types

type DiffOptions

type DiffOptions struct {
	Left  string
	Right string
	IsDir bool
}

type FileDiff

type FileDiff struct {
	Path      string
	Status    string
	LeftData  []byte
	RightData []byte
}

func Diff

func Diff(opts DiffOptions) ([]FileDiff, error)

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(opts PackOptions) (*Filter, error)

func (*Filter) ShouldInclude

func (f *Filter) ShouldInclude(path string) bool

type PackOptions

type PackOptions struct {
	Dir          string
	Output       string
	Include      []string
	Exclude      []string
	Git          bool
	Commit       string
	Since        int
	Staged       bool
	Worktree     bool
	StripPrefix  string
	DryRun       bool
	IgnoreBinary bool
	TxtarIgnore  string
}

type UnpackOptions

type UnpackOptions struct {
	Archive     string
	Dir         string
	Backup      bool
	DryRun      bool
	NoOverwrite bool
}

Jump to

Keyboard shortcuts

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