Documentation
¶
Index ¶
- func AnyFailed(results []Result) bool
- type Check
- type Result
- func CheckCatalog(ctx context.Context, rc config.CatalogConfig) Result
- func CheckNemHome(ctx context.Context) Result
- func CheckProjectManifest(ctx context.Context) Result
- func CheckSandbox(ctx context.Context) Result
- func CheckShellIntegration(ctx context.Context) Result
- func Run(ctx context.Context, checks []Check) []Result
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Check ¶
Check is a named diagnostic. Fn must be safe to call without network access; see ADR-018.
func DefaultChecks ¶
DefaultChecks returns the checks `nem doctor` runs against cfg.
type Result ¶
type Result struct {
Name string
Status Status
Detail string // user-facing one-liner, e.g. "/usr/bin/sandbox-exec"
Remediation string // optional: "run 'nem activate'"
}
Result is the outcome of a single check.
func CheckCatalog ¶
func CheckCatalog(ctx context.Context, rc config.CatalogConfig) Result
CheckCatalog reports whether a catalog's on-disk state is sufficient to load packages offline (ADR-018); requires a pkgs/ subdir per docs/catalog.md.
func CheckNemHome ¶
CheckNemHome verifies NEM_HOME can be created and written to.
func CheckProjectManifest ¶
CheckProjectManifest parses nem.ver in the current working directory.
func CheckSandbox ¶
CheckSandbox verifies the platform sandbox tool is on PATH (ADR-004).
func CheckShellIntegration ¶
CheckShellIntegration reports whether the user's shell rc file contains the managed nem block. For bash, probes ~/.bashrc, ~/.bash_profile, and ~/.profile since the sourced file depends on interactive vs login mode.