Documentation
¶
Index ¶
- func Error(msg string, args ...interface{})
- func Info(msg string, args ...interface{})
- func JSON(data interface{})
- func Print(data interface{}, humanFn func())
- func Quiet(val string)
- func Raw(s string)
- func SetFormat(f Format)
- func Success(msg string, args ...interface{})
- func Table(headers []string, rows [][]string)
- func Warn(msg string, args ...interface{})
- func WithSpinner(msg string, fn func() error) error
- type Format
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
func Print(data interface{}, humanFn func())
Print renders data based on the current format. humanFn is called for text format; data is used for JSON format.
func Quiet ¶
func Quiet(val string)
Quiet always prints the given value, used for essential output in all modes.
func Raw ¶ added in v0.1.7
func Raw(s string)
Raw prints a literal string to stdout without any formatting, prefixes, or % interpretation. Used for dumping file contents and other bytes-in-bytes-out payloads. Suppressed in quiet mode so callers can emit only the minimal summary in that format.
func Success ¶
func Success(msg string, args ...interface{})
Success prints a success message in green.
func Warn ¶ added in v0.1.5
func Warn(msg string, args ...interface{})
Warn prints a warning message in yellow.
func WithSpinner ¶
WithSpinner runs fn while reporting progress.
Behavior by output mode:
- Quiet/JSON: no output, just run fn. JSON consumers parse stdout so any heartbeat noise (even on stderr) pollutes tool-captured output in agents like Claude Code whose Bash tool merges both streams.
- TTY text: animated spinner on stderr.
- Non-TTY text (agents, pipes, logs): print the start message immediately, then emit a heartbeat line every heartbeatInterval showing elapsed time. This gives agents running `poof build` / `poof iterate` / `poof verify` visible progress in their captured stdout instead of nothing for 5-15 min.
Types ¶
Click to show internal directories.
Click to hide internal directories.