printer

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	OutputConsole     = "console"
	OutputConsoleWide = "wide" // same as console, prints additional headers
	OutputYAML        = "yaml"
	OutputJSON        = "json"
)

output types

View Source
const (
	DisplayStyleRelativeTime = "relative_time"
)

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, headers []Header, data interface{}, hideHeader bool, output string, pretty bool)

func PrintConsole

func PrintConsole(out io.Writer, headers []Header, data []interface{}, hideHeader, wideEnabled bool)

Types

type Header struct {
	Title        string
	ValuePath    string
	DisplayStyle string
	IsWide       bool
	ValueFunc    ValueFunc
}

type ValueFunc

type ValueFunc func(interface{}) string

Jump to

Keyboard shortcuts

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