format

package
v0.4.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

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

Option handles format flags and printing the values depending the format

func (*Option) AddFormatFlag

func (o *Option) AddFormatFlag(flags *pflag.FlagSet)

AddFormatFlag add the format flag to a command

func (*Option) Print

func (o *Option) Print(out io.Writer, values interface{}, prettyPrinter PrettyPrinter) error

Print outputs values depending the given format

type PrettyPrinter

type PrettyPrinter func(io.Writer, interface{}) error

PrettyPrinter prints all the values in a pretty print format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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