Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintText ¶
PrintText writes the report as plain text: a header with the version, the platform and the runtime root, then the checks grouped by section with their status label, detail and advice.
func StatusLabel ¶
StatusLabel returns the fixed-width label printed before a check in the text report: [ok], [warn], [fail], or [skip] for any other status.
Types ¶
type Check ¶
type Check struct {
Name string `json:"name"`
Status Status `json:"status"`
Detail string `json:"detail,omitempty"`
Advice string `json:"advice,omitempty"`
Section string `json:"section,omitempty"`
}
Check is one line of the doctor's report: what was checked, its Status, a Detail that says what was found, the Advice to fix it, and the Section it belongs to.
type Report ¶
type Report struct {
Version string `json:"version"`
OS string `json:"os"`
Arch string `json:"arch"`
RuntimeRoot string `json:"runtime_root"`
ConfigPath string `json:"config_path,omitempty"`
Checks []Check `json:"checks"`
}
Report is the result of a doctor run: the version, the platform, the runtime root and configuration path, and every Check.
func Run ¶
Run performs the checks (the runtime directories and the configuration, the model and the credential of the provider, and the tools the runtime relies on, git and uv) and returns the report.
func (Report) HasFailures ¶
HasFailures reports whether any check of the report has failed. Warnings do not count.