display

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func Fail(a any)

func FormattedEnvironment

func FormattedEnvironment(env *types.Environment) [][]string

FormattedEnvironment takes an environment, extracts data from it, and prepares it to be in tabular format. If the environment value is nil, the program will panic.

func Print

func Print(a any)

func Println

func Println(a any)

func RenderTable

func RenderTable(out io.Writer, columns []string, data [][]string)

RenderTable writes data in tabular form with given column names to the provided writer.

Types

type Display

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

func New

func New(writer, errorWriter io.Writer) Display

func (Display) Fail

func (sw Display) Fail(a any) error

func (Display) Print

func (sw Display) Print(a any) error

func (Display) Println

func (sw Display) Println(a any) error

Jump to

Keyboard shortcuts

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