printers

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewTabWriter

func GetNewTabWriter(output io.Writer) *tabwriter.Writer

GetNewTabWriter returns a new formatted tabwriter.Writer.

Types

type PrintOptions

type PrintOptions struct {
	NoHeaders bool
}

PrintOptions holds various options used in ResourcePrinters.

type ResourcePrinter

type ResourcePrinter interface {
	PrintResource(resources.Formatter, io.Writer)
}

ResourcePrinter writes an output of API resources.

type TablePrinter

type TablePrinter struct {
	// contains filtered or unexported fields
}

TablePrinter prints human-readable table structures.

func NewTablePrinter

func NewTablePrinter(o PrintOptions) *TablePrinter

NewTablePrinter creates a new human-readable table printer.

func (*TablePrinter) PrintResource

func (p *TablePrinter) PrintResource(r resources.Formatter, output io.Writer)

PrintResource executes the printer and creates an output.

Jump to

Keyboard shortcuts

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