report

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 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 Basic added in v0.7.0

type Basic interface {
	Info(format string, args ...any)
	Warn(format string, args ...any)
}

Basic is the Info/Warn output surface shared by the pkg, catalog, and publish reporters.

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, ...any)

func (NopPhase) Fail

func (NopPhase) Fail(error)

type Phase

type Phase interface {
	Done(format string, args ...any)
	Fail(err error)
}

Phase represents one operation reported to the user. Begin it with a reporter's Phase method, then call exactly one of Done or Fail when the work finishes. Done reports the completed result (e.g. "Installed foo"); Fail reports failure of the original label. Both Phase and Done take a printf-style format and args, matching Basic's Info/Warn.

Phase is the single completion vocabulary shared by the pkg and catalog reporters: every operation — instant or durational — is reported through it. How a phase is presented (spinner, plain line, nothing) is decided by the reporter implementation.

Jump to

Keyboard shortcuts

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