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

discovery

package
v0.10.18 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 5 Imported by: 0

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

View Source
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

func DiscoverVaults(root string, maxDepth int) ([]string, error)

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.

Jump to

Keyboard shortcuts

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