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

sync

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(sourceRoot string, entry config.AssistantEntry) (string, error)

func PrintDrift

func PrintDrift(report *DriftReport)

func PrintResult

func PrintResult(result *Result)

func ResolvePaths

func ResolvePaths(sourceRoot string, entry config.AssistantEntry) (sourceDir, targetDir string, err error)

Types

type Direction

type Direction int
const (
	LocalToSource Direction = iota
	SourceToLocal
)

type DriftEntry

type DriftEntry struct {
	RelPath string
	Status  string // only_local, only_source, modified
}

type DriftReport

type DriftReport struct {
	Entries []DriftEntry
}

func Compare

func Compare(sourceRoot string, entry config.AssistantEntry) (*DriftReport, error)

type FileAction

type FileAction struct {
	RelPath string
	Action  string // add, update, delete, skip, blocked, ignored
}

type Options

type Options struct {
	DryRun bool
	Backup bool
	Force  bool
}

type Result

type Result struct {
	Actions []FileAction
}

func Add

func Add(sourceRoot string, entry config.AssistantEntry, opts Options) (*Result, error)

func Apply

func Apply(sourceRoot string, entry config.AssistantEntry, opts Options) (*Result, error)

Jump to

Keyboard shortcuts

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