Documentation
¶
Overview ¶
Package packs provides functionality for discovering, loading, and managing dotfile packs within the dodot system.
A pack is a directory containing dotfiles and optional configuration that defines how those files should be deployed. This package handles:
- Pack discovery and validation
- Pack configuration loading (.dodot.toml files)
- Pack ignore functionality (.dodotignore files)
- Pack filtering and selection
The package implements the core pack management logic that feeds into the dodot deployment pipeline.
Index ¶
- func GetPackCandidates(dotfilesRoot string) ([]string, error)
- func GetPackNames(packs []types.Pack) []string
- func GetPacks(candidates []string) ([]types.Pack, error)
- func LoadPackConfig(configPath string) (types.PackConfig, error)
- func SelectPacks(allPacks []types.Pack, selectedNames []string) ([]types.Pack, error)
- func ShouldIgnoreDirectoryTraversal(dirPath string, relPath string) bool
- func ShouldIgnorePack(packPath string) bool
- func ValidatePack(packPath string) error
- type IgnoreChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPackCandidates ¶
GetPackCandidates returns all potential pack directories in the dotfiles root
func GetPackNames ¶
GetPackNames returns a list of pack names
func LoadPackConfig ¶
func LoadPackConfig(configPath string) (types.PackConfig, error)
LoadPackConfig reads and parses a pack's .dodot.toml configuration file
func SelectPacks ¶
SelectPacks filters a list of packs by name
func ShouldIgnoreDirectoryTraversal ¶
ShouldIgnoreDirectoryTraversal checks if a directory should be skipped during traversal This function provides a convenient interface for file walking operations
func ShouldIgnorePack ¶
ShouldIgnorePack checks if a pack should be ignored by checking for a .dodotignore file This function maintains backward compatibility with existing code
func ValidatePack ¶
ValidatePack checks if a directory is a valid pack
Types ¶
type IgnoreChecker ¶
type IgnoreChecker struct {
// contains filtered or unexported fields
}
IgnoreChecker provides unified interface for checking if packs or files should be ignored
func NewIgnoreChecker ¶
func NewIgnoreChecker() *IgnoreChecker
NewIgnoreChecker creates a new IgnoreChecker instance
func (*IgnoreChecker) HasIgnoreFile ¶
func (ic *IgnoreChecker) HasIgnoreFile(dirPath string) bool
HasIgnoreFile checks if a directory contains a .dodotignore file
func (*IgnoreChecker) ShouldIgnoreDirectoryDuringTraversal ¶
func (ic *IgnoreChecker) ShouldIgnoreDirectoryDuringTraversal(dirPath string, relPath string) bool
ShouldIgnoreDirectoryDuringTraversal checks if a directory should be skipped during file traversal This is used when walking through pack contents to find files
func (*IgnoreChecker) ShouldIgnorePackDirectory ¶
func (ic *IgnoreChecker) ShouldIgnorePackDirectory(packPath string) bool
ShouldIgnorePackDirectory checks if a pack directory should be ignored due to .dodotignore file