output

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag added in v0.4.0

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

func NewFlag added in v0.4.0

func NewFlag(o *Flag, defaultType OutputType, defaultStringFormat, defaulErrorFormat string) *Flag

func (*Flag) ErrorFormat added in v0.4.0

func (o *Flag) ErrorFormat() string

func (*Flag) Print added in v0.4.0

func (o *Flag) Print(w io.Writer, b Formater) error

func (*Flag) Set added in v0.4.0

func (o *Flag) Set(v string) error

func (*Flag) String added in v0.4.0

func (o *Flag) String() string

func (*Flag) StringFormat added in v0.4.0

func (o *Flag) StringFormat() string

func (*Flag) Type added in v0.4.0

func (o *Flag) Type() string

type Formater added in v0.4.0

type Formater interface {
	JSON() interface{}
	YAML() interface{}
	Table() (headers []string, data [][]string)
	Text(outFormat, errFormat string) string
}

type OutputType

type OutputType string
const (
	JsonType  OutputType = "json"
	YamlType  OutputType = "yaml"
	TableType OutputType = "table"
	TextType  OutputType = "text"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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