Documentation
¶
Index ¶
- Variables
- func Accent(s string) string
- func Bold(s string) string
- func Code(s string) string
- func Download(name, version string)
- func Error(detail ErrorDetail)
- func Errorf(format string, args ...interface{})
- func Faint(s string) string
- func Info(format string, args ...interface{})
- func New(name, version string)
- func PrintJSON(v interface{}) error
- func PrintJSONError(msg, code, suggestion string)
- func Success(format string, args ...interface{})
- func Summary(parts ...string)
- func Warn(format string, args ...interface{})
- type ErrorDetail
Constants ¶
This section is empty.
Variables ¶
var JSONMode bool
JSONMode when true, all styled output functions are no-ops (stdout remains clean for JSON).
Functions ¶
func Download ¶
func Download(name, version string)
Download prints a download line to stderr: " ↓ name version"
func Error ¶
func Error(detail ErrorDetail)
Error prints a structured error to stderr. Format:
✗ message context Try: suggestion
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf prints a simple formatted error to stderr: " ✗ message"
func Info ¶
func Info(format string, args ...interface{})
Info prints an informational message to stderr: " · message"
func New ¶
func New(name, version string)
New prints a new-install line to stderr: " + name version (new)"
func PrintJSON ¶
func PrintJSON(v interface{}) error
PrintJSON encodes v to stdout with 2-space indentation.
func PrintJSONError ¶
func PrintJSONError(msg, code, suggestion string)
PrintJSONError prints a structured JSON error object to stdout.
func Success ¶
func Success(format string, args ...interface{})
Success prints a success message to stderr: " ✓ message"
Types ¶
type ErrorDetail ¶
ErrorDetail holds structured error information for display.