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

doctor

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package doctor provides a diagnostic command that validates configuration, checks environment health, and reports runtime details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdDoctor

func NewCmdDoctor(props *p.Props) *cobra.Command

NewCmdDoctor creates the doctor command.

func PrintReport

func PrintReport(w io.Writer, report *DoctorReport)

PrintReport writes a human-readable report to the given writer.

Types

type CheckFunc

type CheckFunc = setup.CheckFunc

CheckFunc is an alias for the registry's CheckFunc type.

func DefaultChecks

func DefaultChecks() []CheckFunc

DefaultChecks returns the standard set of diagnostic checks.

type CheckResult

type CheckResult = setup.CheckResult

CheckResult is an alias for the registry's CheckResult type.

type CheckStatus

type CheckStatus = string

CheckStatus is the outcome of a diagnostic check.

const (
	CheckPass CheckStatus = "pass"
	CheckWarn CheckStatus = "warn"
	CheckFail CheckStatus = "fail"
	CheckSkip CheckStatus = "skip"
)

type DoctorReport

type DoctorReport struct {
	Tool    string        `json:"tool"`
	Version string        `json:"version"`
	Checks  []CheckResult `json:"checks"`
}

DoctorReport contains all check results.

func RunChecks

func RunChecks(ctx context.Context, props *p.Props) *DoctorReport

RunChecks executes all diagnostic checks and returns a report.

Jump to

Keyboard shortcuts

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