present

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(title, description string, accessible bool) (bool, error)

func GettingStarted added in v0.2.0

func GettingStarted(w io.Writer, color bool)

func Human

func Human(w io.Writer, r report.Report, style Style)

func HumanWatch

func HumanWatch(w io.Writer, timestamp string, severity report.Severity, message string, color bool)

func JSON

func JSON(w io.Writer, r report.Report) error

func NDJSON

func NDJSON(w io.Writer, value any) error

func PlainProgress

func PlainProgress(out io.Writer, work func(func(ProgressEvent)) (report.Report, error)) (report.Report, error)

func RunProgress

func RunProgress(ctx context.Context, out io.Writer, color bool, work func(func(ProgressEvent)) (report.Report, error)) (report.Report, error)

func Select

func Select(title string, choices []Choice, accessible bool) (string, error)

func SeverityLabel

func SeverityLabel(severity report.Severity, color bool) string

func WriteAtomic

func WriteAtomic(path string, mode os.FileMode, write func(io.Writer) error) error

Types

type Choice

type Choice struct {
	Label string
	Value string
}

type HomeChoice added in v0.2.0

type HomeChoice struct {
	Task   string
	Target string
}

func Home added in v0.2.0

func Home(accessible bool) (HomeChoice, error)

type ProgressEvent

type ProgressEvent struct {
	ID       string
	Label    string
	Status   string
	Duration time.Duration
}

type Style

type Style struct {
	Color bool
	Width int
}

Jump to

Keyboard shortcuts

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