Documentation
¶
Index ¶
- func DiscoverAndSelectPacks(dotfilesRoot string, packNames []string) ([]types.Pack, error)
- func DiscoverAndSelectPacksFS(dotfilesRoot string, packNames []string, filesystem types.FS) ([]types.Pack, error)
- func FindPack(dotfilesRoot string, packName string) (*types.Pack, error)
- func FindPackFS(dotfilesRoot string, packName string, fs types.FS) (*types.Pack, error)
- func ValidateDotfilesRoot(dotfilesRoot string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverAndSelectPacks ¶
DiscoverAndSelectPacks is a helper that combines pack discovery and selection. It discovers all packs in dotfilesRoot and optionally filters by packNames. If packNames is empty, all discovered packs are returned. Pack names are normalized to handle trailing slashes from shell completion.
func DiscoverAndSelectPacksFS ¶
func DiscoverAndSelectPacksFS(dotfilesRoot string, packNames []string, filesystem types.FS) ([]types.Pack, error)
DiscoverAndSelectPacksFS is a helper that combines pack discovery and selection with filesystem support. It discovers all packs in dotfilesRoot using the provided filesystem and optionally filters by packNames. If packNames is empty, all discovered packs are returned. Pack names are normalized to handle trailing slashes from shell completion.
func FindPack ¶
FindPack discovers all packs and returns the one with the specified name. Returns an error if the pack is not found. Pack name is normalized to handle trailing slashes from shell completion.
func FindPackFS ¶
FindPackFS discovers all packs using the given filesystem and returns the one with the specified name. Returns an error if the pack is not found. Pack name is normalized to handle trailing slashes from shell completion.
func ValidateDotfilesRoot ¶
ValidateDotfilesRoot checks if the dotfiles root exists and is a directory. This centralizes the validation that multiple commands need.
Types ¶
This section is empty.