output

package
v0.0.0-...-1f4b2c2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Description string
	Value       interface{}
	ValueList   []interface{}
	ValueMap    map[string]interface{}
}

type Output

type Output struct {
	// OutputType   OutputType
	JsonOutput   bool
	Messages     []*Message
	TableHeaders []interface{}
	TableRows    [][]interface{}
}

Store OutputType for reference when posting messages

func New

func New(jsonOutput bool) *Output

func (*Output) AddDeferredListMessageRead

func (o *Output) AddDeferredListMessageRead(description string, value []interface{})

Adds a message that will not print until Close() is called, to print and align List of primitive Values (string, int, bool)

func (*Output) AddDeferredMapMessageRead

func (o *Output) AddDeferredMapMessageRead(description string, value map[string]interface{})

Adds a message that will not print until Close() is called, to print and align Map Value, string -> primitive (string, int, bool)

func (*Output) AddDeferredMessageRead

func (o *Output) AddDeferredMessageRead(description string, value interface{})

Adds a message that will not print until Close() is called, to print and align Single primitive Value (string, int, bool)

func (*Output) AddErrorUserProvided

func (o *Output) AddErrorUserProvided(value string)

func (*Output) AddErrorUserProvided2

func (o *Output) AddErrorUserProvided2(value string, value2 string)

func (*Output) AddErrorUserProvided3

func (o *Output) AddErrorUserProvided3(value string, value2 string, value3 string)

func (Output) AddFormattedMessageCalculated

func (o Output) AddFormattedMessageCalculated(description string, value interface{})

Add FORMATTED display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (Output) AddFormattedMessageCalculated2

func (o Output) AddFormattedMessageCalculated2(description string, value interface{}, value2 interface{})

Add FORMATTED display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (Output) AddFormattedMessageCalculated3

func (o Output) AddFormattedMessageCalculated3(description string, value interface{}, value3 interface{})

Add FORMATTED display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (Output) AddFormattedMessageCalculatedDanger

func (o Output) AddFormattedMessageCalculatedDanger(description string, value interface{})

Add FORMATTED display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (*Output) AddFormattedMessageUserProvided

func (o *Output) AddFormattedMessageUserProvided(description string, value interface{})

Add FORMATTED display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (*Output) AddFormattedMessageUserProvided2

func (o *Output) AddFormattedMessageUserProvided2(description string, value interface{}, value2 interface{})

func (*Output) AddFormattedMessageUserProvided3

func (o *Output) AddFormattedMessageUserProvided3(description string, value interface{}, value2 interface{}, value3 interface{})

func (Output) AddMessageCalculated

func (o Output) AddMessageCalculated(description string, value interface{})

Add display information to show progress to terminal users This will be printed immediately for DefaultOutput

func (*Output) AddMessageUserProvided

func (o *Output) AddMessageUserProvided(description string, value interface{})

Add display information to show progress to terminal users This will be printed immediately for DefaultOutput THIS IS CALLED A RECIEVER FUNCTION https://www.youtube.com/watch?v=HE6tbWlymmk Also a method. You can only define methods on a type defined in that same package

func (*Output) AddMessageUserProvided2

func (o *Output) AddMessageUserProvided2(value1 interface{}, description string, value2 interface{})

func (*Output) AddMessageUserProvided3

func (o *Output) AddMessageUserProvided3(description1 string, value1 interface{}, description2 string, value2 interface{})

func (*Output) AddPassUserProvided

func (o *Output) AddPassUserProvided(value string)

func (*Output) AddTableHeaders

func (o *Output) AddTableHeaders(headers ...interface{})

Add headers for table, used for a list of items

func (*Output) AddTableRows

func (o *Output) AddTableRows(rows ...interface{})

Add rows for at table, will be matched to headers set in AddTableHeaders, used for a list of items

func (*Output) Close

func (o *Output) Close()

Jump to

Keyboard shortcuts

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