formatter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONFormatter

func NewJSONFormatter() jsonFormatter

NewJSONFormatter formats output into json

func NewTableFormatter

func NewTableFormatter() tableFormatter

NewTableFormatter returns a table formatter

Types

type Formatter

type Formatter interface {
	// Format will call the getter func and render the returned data
	Format(getter func() interface{}) (string, error)
}

Formatter formats data

type TableContents

type TableContents struct {
	Headers []string
	Data    [][]string
}

TableContents represents the contents of a table

Jump to

Keyboard shortcuts

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