utils

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgeFormatter added in v0.0.2

func AgeFormatter(seconds uint64) string

Format seconds to a string in the following formats '1d1h'/'1m1s'

func GetColorFn

func GetColorFn(id int) func(...interface{}) string

Get a color function

func GetColorsFn

func GetColorsFn(id int) (func(...interface{}) string, func(...interface{}) string)

Get two color functions

func GetTableRowColor added in v0.0.2

func GetTableRowColor(id int) tablewriter.Colors

Get a tablewriter color depending of a given ID

func GetTableWriter

func GetTableWriter(header []string) *tablewriter.Table

Generate a writer for tablewriter

func SelfUpdate added in v0.0.2

func SelfUpdate(version string) error

Update the binary version if a newer is found

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL