Versions in this module Expand all Collapse all v0 v0.10.0 Nov 23, 2026 Changes in this version + func Background() context.Context + func Begin(ctx context.Context, subject, message string) (context.Context, func(error)) + func FormatDuration(d time.Duration) string + func GuardInterrupts() func() + func HandOff() func() + func InterruptsGuarded() bool + func Message(ctx context.Context, text string) + func NewContext(ctx context.Context, p Presenter) context.Context + func Progress(ctx context.Context, text string) + func SetDefault(p Presenter) + func Track(ctx context.Context, subject, message string, fn func(context.Context) error) error + func Warn(ctx context.Context, text string) + type Console struct + func NewConsole(w io.Writer, opts ConsoleOptions) *Console + func (c *Console) Close() + func (c *Console) Emit(ctx context.Context, event Event) + func (c *Console) Pause() + func (c *Console) Resume() + func (c *Console) WatchInterrupts(guarded func() bool) func() + type ConsoleOptions struct + Height func() int + Interactive bool + Level slog.Level + Now func() time.Time + Terminal Terminal + Width func() int + type Event struct + Duration time.Duration + Err error + ID string + Kind Kind + Level slog.Level + Message string + ParentID string + Record *slog.Record + Subject string + type Group struct + func NewGroup(ctx context.Context, prefix string) *Group + func (g *Group) Close(err error) + func (g *Group) Done(name string) + func (g *Group) Fail(name string, err error) + func (g *Group) Progress(name, text string) + func (g *Group) Start(name string) + type JSON struct + func NewJSON(w io.Writer) *JSON + func (j *JSON) Emit(_ context.Context, event Event) + type Kind string + const KindApplied + const KindApplying + const KindFailed + const KindInputNeeded + const KindLog + const KindMessage + const KindProgress + type LogHandler struct + func NewLogHandler(p Presenter, level slog.Leveler) *LogHandler + func (h *LogHandler) Enabled(_ context.Context, level slog.Level) bool + func (h *LogHandler) Handle(ctx context.Context, r slog.Record) error + func (h *LogHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *LogHandler) WithGroup(name string) slog.Handler + type Presenter interface + Emit func(ctx context.Context, event Event) + var Discard Presenter = discard{} + func Default() Presenter + func FromContext(ctx context.Context) Presenter + func New(format logging.Format, w io.Writer, opts ConsoleOptions) Presenter + type Terminal interface + Enter func() + Leave func()