Documentation
¶
Overview ¶
Package discovery locates VaultMind vaults under a root directory so multi-vault commands (e.g. `doctor --all`) can operate over every vault in a workspace without the operator enumerating them by hand.
Index ¶
Constants ¶
const DefaultMaxDepth = 4
DefaultMaxDepth bounds how deep DiscoverVaults walks below the root. A small bound keeps discovery fast and prevents an accidental walk of an enormous tree (e.g. a home directory). Depth 0 is the root itself; each nested directory adds one. Four levels comfortably covers a workspace/group/project layout while staying cheap.
Variables ¶
This section is empty.
Functions ¶
func DiscoverVaults ¶
DiscoverVaults returns the absolute paths of every VaultMind vault found at or below root, in deterministic (lexically sorted) order. A directory is a vault when it contains a .vaultmind/ SUBDIRECTORY (a file of that name does not qualify). Once a vault is found, its subtree is NOT descended — a vault's own internals (and any nested vaults) are skipped, so each vault is reported exactly once. The walk stops at maxDepth levels below root.
root must exist and be a directory; otherwise an error is returned (an unreadable or missing root is a hard failure, not a silent empty result). A readable root with no vaults yields an empty, non-nil-error result.
Types ¶
This section is empty.