output

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputFormat string
)

Functions

func Confirmation

func Confirmation(prompt string, yes bool) error

Types

type Output

type Output struct {
	Table      TableOutput
	DataOutput interface{}
}

func NewOutput

func NewOutput(table TableOutput, dataOutput interface{}) *Output

func (*Output) AddSubHeaders

func (o *Output) AddSubHeaders(headers []string)

func (*Output) VariableOutput

func (o *Output) VariableOutput() error

type OutputType

type OutputType string
const (
	OUTPUT_TABLE OutputType = "table"
	OUTPUT_JSON  OutputType = "json"
	OUTPUT_YAML  OutputType = "yaml"
)

type TableOutput

type TableOutput struct {
	Headers       []string
	SubHeaders    []string
	Data          [][]interface{}
	ColumnConfigs []table.ColumnConfig
}

Jump to

Keyboard shortcuts

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