doctor

package
v0.30.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallSummary

func InstallSummary(executable string) string

InstallSummary classifies common install layouts without invoking package managers.

Types

type CollectOptions

type CollectOptions struct {
	Version           string
	Commit            string
	Date              string
	DaemonStatus      string
	Executable        func() (string, error)
	ResolveExecutable func(string) (string, error)
	WorkingDir        func() (string, error)
	HomeDir           func() (string, error)
	StateHome         string
}

CollectOptions allows tests and future callers to inject local discovery.

type Report

type Report struct {
	Version      string   `json:"version"`
	Commit       string   `json:"commit"`
	Date         string   `json:"date"`
	Executable   string   `json:"executable"`
	Install      string   `json:"install"`
	HomeDir      string   `json:"home_dir"`
	WorkingDir   string   `json:"working_dir"`
	ConfigPath   string   `json:"config_path"`
	DataDir      string   `json:"data_dir"`
	StateDir     string   `json:"state_dir"`
	DaemonStatus string   `json:"daemon_status"`
	Warnings     []string `json:"warnings,omitempty"`
}

Report is a credential-free local health snapshot for support and CI smoke.

func Collect

func Collect(version, commit, date, daemonStatus string) Report

Collect builds a Report without starting daemons or reading credentials.

func CollectWithOptions

func CollectWithOptions(opts CollectOptions) Report

CollectWithOptions builds a Report with injectable local discovery functions.

func (Report) TextLines

func (r Report) TextLines() []string

TextLines renders a stable human-readable report.

Jump to

Keyboard shortcuts

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