Documentation
¶
Overview ¶
Package clioutput renders plain, copyable CLI results.
Index ¶
- func CommandOf(err error) (string, bool)
- func CommandTitle(program, path string) string
- func Render(message Message) (string, error)
- func StartProgress(ctx context.Context, stdout, stderr io.Writer, human bool, label string) func()
- func TerminalWidth(output io.Writer, fallback int) int
- func WithoutProgress(ctx context.Context) context.Context
- func WrapCommand(command string, err error) error
- func Write(output io.Writer, message Message) error
- type Block
- type Field
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandTitle ¶
CommandTitle returns a canonical command title without argument placeholders.
func StartProgress ¶
StartProgress shows a delayed loader during a quiet human wait. Call the returned stop function before writing anything to either stream or returning. It joins the renderer and clears its line, even on cancellation.
func TerminalWidth ¶
TerminalWidth uses the destination's terminal size, or fallback for pipes and files.
func WithoutProgress ¶
WithoutProgress disables progress rendering for the invocation.
func WrapCommand ¶
WrapCommand attaches command context to err.
Types ¶
type Block ¶
type Block interface {
// contains filtered or unexported methods
}
Block is content rendered inside a message.