doctor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(report Report) string

Types

type Check

type Check struct {
	ID      string         `json:"id"`
	Label   string         `json:"label"`
	Status  Status         `json:"status"`
	Message string         `json:"message"`
	Details map[string]any `json:"details,omitempty"`
}

type Options

type Options struct {
	Now            func() time.Time
	Runtime        string
	UserConfig     string
	ProjectConfig  string
	Provider       config.ProviderProfile
	WorkspaceRoot  string
	Sandbox        config.SandboxConfig
	Connectivity   bool
	ProviderHealth *providerhealth.Result
	// GOOS overrides the platform used to resolve the sandbox backend. Empty
	// means runtime.GOOS. Tests set it to assert platform-specific remedies.
	GOOS string
	// LookupExecutable resolves a binary on PATH for the sandbox-backend and
	// LSP-server checks. Nil means exec.LookPath; tests inject a stub so the
	// checks are deterministic regardless of the host's installed tooling.
	LookupExecutable func(string) (string, error)
}

type Report

type Report struct {
	GeneratedAt string  `json:"generatedAt"`
	OK          bool    `json:"ok"`
	Checks      []Check `json:"checks"`
}

func Run

func Run(options Options) Report

func (Report) Check

func (report Report) Check(id string) *Check

type Status

type Status string
const (
	StatusPass Status = "pass"
	StatusWarn Status = "warn"
	StatusFail Status = "fail"
)

Jump to

Keyboard shortcuts

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