Documentation
¶
Index ¶
- func JSON(data interface{})
- func JoinStrings(items []string, sep string) string
- func KeyValue(pairs [][2]string)
- func Print(data interface{}, tableFn func(data interface{}))
- func PrintRaw(body []byte, tableFn func(data map[string]interface{}))
- func Progressf(format string, args ...interface{})
- func StringOrEmpty(v interface{}) string
- func Success(msg string)
- func Successf(format string, args ...interface{})
- func Table(headers []string, rows [][]string)
- func Truncate(s string, maxLen int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinStrings ¶
JoinStrings joins a slice of strings.
func KeyValue ¶
func KeyValue(pairs [][2]string)
KeyValue renders key-value pairs in a simple format.
func Print ¶
func Print(data interface{}, tableFn func(data interface{}))
Print outputs data as JSON or table based on the --json flag.
func Progressf ¶ added in v0.1.4
func Progressf(format string, args ...interface{})
Progressf prints a progress or status message to stderr.
Long-running commands report progress this way so stdout carries only the command's result and stays parseable by scripts and agents.
func StringOrEmpty ¶
func StringOrEmpty(v interface{}) string
StringOrEmpty returns the string value of an interface or empty string.
func Successf ¶
func Successf(format string, args ...interface{})
Successf prints a formatted success message.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.