Discover Packages
github.com/sofia-ctx/sofia
internal
common
doctor
package
Version:
v0.13.0
Opens a new window with list of versions in this module.
Published: Jul 9, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 20
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package doctor implements `sf doctor` — a one-call health check of the local
sf install. Its anchor check is binary staleness: whether bin/sf is older
than git HEAD (the "fixed in git but never rebuilt" trap, which silently
makes the agent run outdated tools). It also checks PATH resolution and
shell completions.
NewCommand returns the `doctor` Cobra command (`sf doctor`).
Run collects the checks, renders them, logs the call, and returns a non-nil
error (→ exit 1) when any check FAILs so doctor can gate scripts.
type Check struct {
Name string `json:"name"`
Status string `json:"status"`
Detail string `json:"detail"`
}
Check is one health probe.
type Options struct {
Format string
}
Options carries flag state.
type Result struct {
Checks []Check `json:"checks"`
}
Result is the full report.
Collect runs every check in order. It never errors (each check degrades to a
warn/ok), so the report is always renderable.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.