doctor

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(reqs ...Requirement) []error

Check returns an error for each requirement in reqs missing from PATH.

func CheckAll

func CheckAll() []error

CheckAll returns an error for each known requirement missing from PATH.

func IsMissing

func IsMissing(errs []error, r Requirement) bool

IsMissing reports whether a requirement appears in the error slice returned by CheckAll.

func MissingNames

func MissingNames(errs []error) []string

MissingNames returns the human-readable names of all missing requirements.

Types

type ErrRequirementMissing

type ErrRequirementMissing struct {
	Req Requirement
}

ErrRequirementMissing is returned when a required tool is absent from PATH.

func (ErrRequirementMissing) Error

func (e ErrRequirementMissing) Error() string

type Requirement

type Requirement string

Requirement is the binary name looked up on PATH.

const (
	Git          Requirement = "git"
	Task         Requirement = "task"
	Docker       Requirement = "docker"
	Air          Requirement = "air"
	Go           Requirement = "go"
	Sqlc         Requirement = "sqlc"
	Goose        Requirement = "goose"
	Buf          Requirement = "buf"
	Golangcilint Requirement = "golangci-lint"
)

func All

func All() []Requirement

All returns all known requirements in declaration order.

type RequirementInfo

type RequirementInfo struct {
	Name        string
	URL         string
	Recommended bool
}

RequirementInfo holds human-readable metadata for a requirement.

Recommended marks tools that are *optionally* useful — missing them shows as a warning rather than a failure when no project actually relies on them. A project that does use them (e.g. a service with `db = postgres`) lifts them back to required by listing them in its needs.

func Info

Info returns display metadata for a requirement.

Jump to

Keyboard shortcuts

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