doctor

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 12 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 checks the whole player setup: the capture, the addons, the dataset cache and the client configs. It reads files only; the one thing it writes is a short-lived probe file to prove a folder is writable.

Index

Constants

View Source
const (
	Pass = "pass"
	Fail = "fail"
	Info = "info"
)

Statuses of a check. Info never fails the report.

View Source
const StaleAfter = time.Hour

StaleAfter is how old a capture may be before the doctor asks for a /reload.

Variables

View Source
var Addons = []string{"WoWCompanion", digest.SlotAddon, ask.SlotAddon}

Addons are the folders the player installs under Interface/AddOns.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name   string `json:"name"`
	Status string `json:"status" jsonschema:"pass, fail or info"`
	Detail string `json:"detail"`
	Fix    string `json:"fix,omitempty" jsonschema:"one-line fix; set when the check failed"`
}

Check is one line of the report.

type Options

type Options struct {
	SavedVariables string
	SVSource       string // "auto", "env" or "flag": where SavedVariables came from; empty says nothing
	Cache          string // dataset cache root; empty means the per-user cache
	Now            time.Time
	Env            setup.Env
}

Options says what to check; Now and Env make it testable.

type Report

type Report struct {
	OK     bool    `json:"ok" jsonschema:"true when no check failed"`
	Checks []Check `json:"checks"`
	Text   string  `json:"text" jsonschema:"plain-text rendering, one line per check"`
}

Report is the doctor's result.

func Run

func Run(opt Options) Report

Run performs every check. It never returns an error: a problem is a failed check.

Jump to

Keyboard shortcuts

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