discovery

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverAndSelectPacks

func DiscoverAndSelectPacks(dotfilesRoot string, packNames []string) ([]types.Pack, error)

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

func FindPack(dotfilesRoot string, packName string) (*types.Pack, error)

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

func FindPackFS(dotfilesRoot string, packName string, fs types.FS) (*types.Pack, error)

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

func ValidateDotfilesRoot(dotfilesRoot string) error

ValidateDotfilesRoot checks if the dotfiles root exists and is a directory. This centralizes the validation that multiple commands need.

Types

This section is empty.

Jump to

Keyboard shortcuts

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