report

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package report holds reporting primitives shared by the pkg and catalog layers without creating an import cycle between them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hinted

type Hinted struct {
	Err  error
	Hint string
}

Hinted pairs an error with a one-line remediation hint, rendered as a "→" line by output.ReportError. Lives here (a leaf package) so any layer can attach a hint without importing internal/output.

func (Hinted) Error

func (e Hinted) Error() string

func (Hinted) Unwrap

func (e Hinted) Unwrap() error

type NopPhase

type NopPhase struct{}

NopPhase is a Phase that renders nothing. Used by discard reporters.

func (NopPhase) Done

func (NopPhase) Done(string)

func (NopPhase) Fail

func (NopPhase) Fail(error)

type Phase

type Phase interface {
	Done(final string)
	Fail(err error)
}

Phase represents an in-flight operation that has measurable duration. Call exactly one of Done or Fail when it finishes; Done's argument is the completed-state message (e.g. "Installed foo"), Fail reports failure of the original label.

Phase is the durational half of the completion vocabulary shared by the pkg and catalog reporters; its instant counterpart is a reporter's Completed method. Use Phase for work long enough to surface progress, and Completed for an operation with no measurable duration (e.g. a directory removal). How either is presented is decided by the reporter implementation.

Jump to

Keyboard shortcuts

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