format

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

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

func GetFormat

func GetFormat() *Format

func (*Format) Get

func (f *Format) Get() string

func (*Format) GetOutput

func (f *Format) GetOutput() io.Writer

func (*Format) Print

func (f *Format) Print(obj any)

func (*Format) Set

func (f *Format) Set(format string)

func (*Format) SetOutput

func (f *Format) SetOutput(writer io.Writer)

type TableField

type TableField struct {
	Header string
	Field  string
}

TableField defines the mapping between a table header and a data field. This allows for custom headers and ordering of columns in the table output. The Field should match the name of the field in the struct.

type TabularData

type TabularData struct {
	Data   any
	Fields []TableField
}

TabularData is a wrapper for data that should be printed as a table. It allows for specifying the fields to be included in the table, along with their headers and order.

Jump to

Keyboard shortcuts

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