prettycli

package
v0.0.0-...-ccbff5b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

README

prettycli

A generic library of helpers for pretty text output, intended for TUI applications.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CombinedOutput

type CombinedOutput struct {
	Outputs []sectionedOutput
}

func (*CombinedOutput) AddOutput

func (o *CombinedOutput) AddOutput(heading string, output Output)

func (*CombinedOutput) ToPrettyOutput

func (o *CombinedOutput) ToPrettyOutput() string

type DetailOutput

type DetailOutput struct {
	Details map[string]string
	Order   []string
}

func (DetailOutput) ToPrettyOutput

func (o DetailOutput) ToPrettyOutput() string

type ListOutput

type ListOutput struct {
	Labels []string
	Rows   []map[string]string
}

func (*ListOutput) AddRow

func (o *ListOutput) AddRow(m map[string]string)

func (ListOutput) ToPrettyOutput

func (o ListOutput) ToPrettyOutput() string

type Output

type Output interface {
	ToPrettyOutput() string
}

type PlainOutput

type PlainOutput struct {
	Output string
}

func (PlainOutput) ToPrettyOutput

func (o PlainOutput) ToPrettyOutput() string

Jump to

Keyboard shortcuts

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