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

dotfiles

package
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnsurePrerequisites    = system.EnsurePrerequisites
	HandleExistingRepo     = handleExistingRepo
	UpdateBareRepoWorktree = updateBareRepoWorktree
	FreshInstall           = freshInstall
	CloneBareRepo          = cloneBareRepo
	BackupConflicts        = backupConflicts
	CheckoutWorktree       = repo.CheckoutWorktree
	InitSubmodules         = repo.InitSubmodules
	ConfigureBareRepo      = repo.ConfigureBareRepo
	Stat                   = os.Stat
	EnsureSSH              = ensureSSHIfRequired
	UISelect               = ui.Select
	BareClone              = repo.BareClone
)

Test hooks and mockable dependencies

View Source
var FetchRepo = func(ctx context.Context, repoPath, worktreePath string) error {
	return repo.FetchBareRepo(ctx, repoPath, worktreePath)
}
View Source
var PullRebaseRepo = func(ctx context.Context, repoPath, worktreePath string) error {
	return repo.PullRebaseBareRepo(ctx, repoPath, worktreePath)
}

pullRebaseRepo is a package-level variable used for testing.

View Source
var UpdateSubmodules = func(ctx context.Context, repoPath, worktreePath string) error {
	return repo.InitSubmodules(ctx, repoPath, worktreePath, nil)
}

Functions

func Install

func Install(ctx context.Context, opts InstallOptions) error

Install orchestrates the complete dotfiles installation workflow.

func SyncRepo

func SyncRepo(ctx context.Context, repoPath, worktreePath string, isVerbose bool) error

SyncRepo performs the fetch, pull-rebase, and submodule update operations for a bare repository.

Types

type InstallOptions added in v1.14.0

type InstallOptions struct {
	RepoURL      string
	Branch       string
	BareRepoPath string
	WorktreePath string
	Verbose      bool
}

InstallOptions holds configuration for installing dotfiles.

Jump to

Keyboard shortcuts

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