output

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONOutput = "json"
	YAMLOutput = "yaml"
)

Variables

This section is empty.

Functions

func FormatAge added in v0.44.0

func FormatAge(t time.Time) string

FormatAge returns a formatted age string corresponding to the date provided

func FormatArrayMessage

func FormatArrayMessage(message string, list []string) string

FormatArrayMessage format an array to a list

func FormatDuration added in v0.44.0

func FormatDuration(d time.Duration) string

FormatDuration formats a duration in a human-readable way

func Handle

func Handle(writer io.Writer, output string, obj interface{}) error

func HandleString

func HandleString(writer io.Writer, msg string) error

func HandlerTable

func HandlerTable(writer io.Writer, column []string, data [][]string)

func ValidateAndSet

func ValidateAndSet(o *string) error

ValidateAndSet will validate the given output and if it's empty will set it with the default value "yaml"

Types

This section is empty.

Jump to

Keyboard shortcuts

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