Documentation
¶
Index ¶
- Variables
- func Config() *config.Config
- func Execute()
- func FormatDuration(seconds int) string
- func FormatProgress(current, total int, width int) string
- func JSONOutput() bool
- func Minimal(value string)
- func MinimalF(format string, args ...interface{})
- func Normal(label, value string)
- func NormalF(format string, args ...interface{})
- func SetOutputMode(mode OutputMode)
- func StatusIcon(active bool) string
- func TruncateString(s string, maxLen int) string
- func Verbose() bool
- type OutputMode
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Set via ldflags at build time Version = "dev" Commit = "unknown" BuildDate = "unknown" )
Functions ¶
func FormatDuration ¶
FormatDuration formats a duration in seconds as mm:ss or hh:mm:ss.
func FormatProgress ¶
FormatProgress formats a progress bar.
func MinimalF ¶
func MinimalF(format string, args ...interface{})
MinimalF prints minimal formatted output.
func NormalF ¶
func NormalF(format string, args ...interface{})
NormalF prints normal formatted output.
func StatusIcon ¶
StatusIcon returns an icon for the given boolean status.
func TruncateString ¶
TruncateString truncates a string to maxLen, adding "..." if truncated.
Types ¶
type OutputMode ¶
type OutputMode int
OutputMode represents the output format.
const ( OutputNormal OutputMode = iota OutputMinimal OutputTable OutputJSON )
Click to show internal directories.
Click to hide internal directories.