list

package
v5.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT, MIT, MIT, + 1 more Imports: 5 Imported by: 112

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, cfg *Config) error

Print (s) out details list given configuration data

Types

type Config

type Config struct {
	// Title that is displayed for the list of details
	Title string
	// TitleStyle formats the title; optional.
	TitleStyle StrTransform
	// RowFormatter transforms /all/ rows; optional.
	RowFormatter StrTransform
	// LabelStyle formats the name; optional.
	LabelStyle StrTransform
	// Rows describes all rows to display
	Rows []*Row
}

Config describes detail list

type Row

type Row struct {
	// Label of the row
	Label string
	// Value to display
	Value string
}

Row of data to display

type StrTransform

type StrTransform func(string) string

StrTransform .. use to transform values; typically used to apply unicode colors to cells

Jump to

Keyboard shortcuts

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