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

doctor

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package doctor provides health checks for certify setup and environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOnboardPlan

func FormatOnboardPlan(plan *OnboardPlan) string

FormatOnboardPlan renders the plan as a human-readable string.

func FormatReport

func FormatReport(r *Report) string

FormatReport renders the report as a human-readable string.

Types

type Check

type Check struct {
	Name    string
	Group   string
	Status  CheckStatus
	Message string
	Fix     string // suggested fix command or action
}

Check represents a single health check result.

type CheckStatus

type CheckStatus int

CheckStatus represents the result of a single health check.

const (
	StatusPass CheckStatus = iota
	StatusWarn
	StatusFail
	StatusSkip
)

func (CheckStatus) Emoji

func (s CheckStatus) Emoji() string

Emoji returns the status emoji.

func (CheckStatus) String

func (s CheckStatus) String() string

type OnboardPlan

type OnboardPlan struct {
	Steps []OnboardStep
	Root  string
}

OnboardPlan holds the full onboarding plan for a project.

func BuildOnboardPlan

func BuildOnboardPlan(root string) *OnboardPlan

BuildOnboardPlan creates an onboarding plan by checking what's already done.

func (*OnboardPlan) AllDone

func (p *OnboardPlan) AllDone() bool

AllDone returns true if every step is done.

func (*OnboardPlan) NextStep

func (p *OnboardPlan) NextStep() *OnboardStep

NextStep returns the first step that is Ready or Pending, or nil if all done.

type OnboardStatus

type OnboardStatus int

OnboardStatus represents whether a step is done.

const (
	OnboardPending OnboardStatus = iota
	OnboardDone
	OnboardReady // dependencies met, ready to run
)

func (OnboardStatus) Emoji

func (s OnboardStatus) Emoji() string

type OnboardStep

type OnboardStep struct {
	Number      int
	Title       string
	Description string
	Command     string        // command to run (empty = informational)
	Status      OnboardStatus // computed from filesystem
	Detail      string        // additional context
}

OnboardStep represents a single onboarding step.

type Report

type Report struct {
	Checks []Check
	Root   string
}

Report holds the full doctor report.

func RunAll

func RunAll(root string) *Report

RunAll runs all health checks for the given root directory.

func (*Report) HasFailures

func (r *Report) HasFailures() bool

HasFailures returns true if any check failed.

func (*Report) Summary

func (r *Report) Summary() (pass, warn, fail, skip int)

Summary returns pass/warn/fail/skip counts.

Jump to

Keyboard shortcuts

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