holiday

package module
v1.0.0-rc Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 7 Imported by: 0

README

holiday - a small Go package for displaying information about installed tooling.

screenshot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoVersionFunc

func GoVersionFunc() (string, error)

func PrintEval

func PrintEval(opts PrintOpts, deps ...ShellDependency) (uint, error)

func SprintStatusMessage

func SprintStatusMessage(status DoctorItemStatus, indent string, message string) string

Types

type DoctorItemStatus

type DoctorItemStatus int
const (
	PASS DoctorItemStatus = iota
	WARN
	FAIL
)

type InstallationInfo

type InstallationInfo struct {
	Installed      bool
	Version        string
	ExecutablePath string
}

type PrintOpts

type PrintOpts struct {
	OutputVerbose bool
	Output        io.Writer
}

type ShellDependency

type ShellDependency struct {
	ExeName     string
	ProgramName string
	Required    bool
	Description string
	*InstallationInfo

	VersionFunc VersionFunc
}

func (*ShellDependency) LoadInstallationInfo

func (s *ShellDependency) LoadInstallationInfo() error

func (ShellDependency) Summarize

func (s ShellDependency) Summarize() string

func (ShellDependency) SummarizeShort

func (s ShellDependency) SummarizeShort() string

type VersionFunc

type VersionFunc func() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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