Documentation
¶
Index ¶
- Variables
- func ByteCountSI(b uint64) string
- func CreateProgressbar(length int, title string) *progressbar.ProgressBar
- func CreateTable() (*table.Table, error)
- func HumanDuration(timestamp int64) string
- func RemoveSha(str string) string
- func ShortenID(str string) string
- func SmallSHA(hash string) string
- func StripTagMeta(image string) string
- func ToJSON(headers []string, rows [][]string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var BoldStyle = lipgloss.NewStyle(). Bold(true). Underline(true)
Functions ¶
func ByteCountSI ¶
ByteCountSI presents a human friendly representation of a byte count. See https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format.
func CreateProgressbar ¶
CreateProgressbar generates a progress bar
func CreateTable ¶
CreateTable prepares a table layout for output.
func HumanDuration ¶
HumanDuration from docker/cli RunningFor() to be accessible outside of the class
func StripTagMeta ¶
StripTagMeta strips front-matter image tag data that we don't need for parsing.
func ToJSON ¶
ToJSON converts a lipgloss.Table to JSON representation. It's not a robust implementation and mainly caters for our current use case which is basically a bunch of strings. See https://github.com/charmbracelet/lipgloss/issues/335 for the real thing (hopefully).
Types ¶
This section is empty.