doctor

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package doctor provides diagnostic checks for Mush CLI health.

This package implements a check framework that validates:

  • API connectivity and response time
  • Authentication status and credential source
  • Claude CLI availability and version
  • CLI version against latest release

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Summary

func Summary(results []Result) (passed, failed, warnings int)

Summary returns counts of passed, failed, and warning checks.

Types

type Check

type Check func(ctx context.Context) Result

Check is a diagnostic check function.

type Result

type Result struct {
	Name    string
	Status  Status
	Message string
	Detail  string // Optional additional detail
}

Result holds the outcome of a single check.

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes diagnostic checks.

func New

func New() *Runner

New creates a new diagnostic runner.

func (*Runner) AddCheck

func (r *Runner) AddCheck(name string, check Check)

AddCheck registers a diagnostic check.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) []Result

Run executes all registered checks and returns the results.

type Status

type Status int

Status represents the result of a diagnostic check.

const (
	// StatusPass indicates the check passed.
	StatusPass Status = iota
	// StatusWarn indicates a non-critical issue.
	StatusWarn
	// StatusFail indicates a critical failure.
	StatusFail
)

func (Status) Symbol

func (s Status) Symbol() string

Symbol returns the status symbol for display.

Jump to

Keyboard shortcuts

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