package
1.5.1
Repository: https://github.com/upcloudltd/upcloud-cli.git
Documentation: pkg.go.dev

# Functions

AbbrevNum returns a string with the given number abbreviated with SI formatting (eg 1000 = 1k).
AbbrevNumBinaryPrefix returns a string with the given number abbreviated with binary formatting (eg 1024 = 1ki).
CommandUsageTemplate returns the template for usage.
ConcatStrings like join but handles well the empty strings.
FormatBool return v formatted (eg.
FormatBytes returns a string with the given number interpreted as bytes and abbreviated with binary formatting (eg 1024 = 1KiB).
FormatRange takes start and end value and generates a ranged value.
FormatTime returns a time.Time in RFC3339, adding information on how long ago it was if the time was under 8 hours ago.
IndentText indents s with prefix.
NewDataTable returns a new output data container for tabulated data.
NewDetailsView returns a new output data container for details rendered as a table.
NewListLayout returns a a new list data renderer.
NewLiveLog returns a new renderer for live logs.
NewLogEntry creates a new LogEntry with the specified message.
ParseAbbrevNum parses a string formatted to an uint in SI unit style.
ParseAbbrevNumBinaryPrefix parses a string formatted to an uint in binary units.
TruncateText truncates s to maxLen and adds a suffix ("...") if the string was truncated.
UsageFunc is used to override cobra's default usage func to get some more stylistic control.
WrapWithListLayout returns a list data renderer wrapping given text.

# Variables

DefaultAddressColours defines the default colours used for addresses.
DefaultBooleanColoursFalse defines the default colours used for boolean false values.
DefaultBooleanColoursTrue defines the default colours used for boolean true values.
DefaultErrorColours defines the default colours used for errors.
DefaultHeaderColours defines the default colours used for headers.
DefaultNoteColours defines the default colours used for notes.
DefaultUUUIDColours defines the default colours used for UUIDs.
ListLayoutDefault defines the default config used for rendering lists.
ListLayoutNestedTable defines the configuration used for rendering nested tables.
LiveLogDefaultConfig represents the default settings for live log.

# Structs

DataTable is a container for tabulated output data.
DetailsView is an output data container for details rendered as a table.
ListLayout is a renderer of list data.
LiveLog represents the internal state of a live log renderer.
LiveLogConfig is a configuration for rendering live logs.
LogEntry represents a single log entry in a live log.