closureoption

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChain

func AddChain(opts *output.Options, chain, add processing.ProcessChain) processing.ProcessChain

func History

func History(e interface{}) string

func OutputChainFunction

func OutputChainFunction(cf ClosureFunction, chain processing.ProcessChain) output.ChainFunction

OutputChainFunction provides an chain function that can be used to add an option based closure processing and an optional additional chain to an output chain.

func TableOutput

func TableOutput(in *output.TableOutput, closure ...ClosureFunction) *output.TableOutput

Types

type ClosureFunction

type ClosureFunction func(*output.Options, interface{}) []interface{}

func (ClosureFunction) Exploder

type Option

type Option struct {
	standard.TransferOptionsCreator

	ElementName      string
	Closure          bool
	ClosureField     string
	AddReferencePath options.OptionSelector
	AdditionalFields []string
	FieldEnricher    func(interface{}) []string
	// contains filtered or unexported fields
}

func From

func New

func New(elemname string, settings ...interface{}) *Option

func (*Option) AddFlags

func (o *Option) AddFlags(fs *pflag.FlagSet)

func (*Option) ApplyTransferOption

func (o *Option) ApplyTransferOption(opts transferhandler.TransferOptions) error

func (*Option) Explode

func (*Option) Headers

func (o *Option) Headers(opts options.OptionSetProvider, cols []string) []string

func (*Option) IsTrue

func (o *Option) IsTrue() bool

func (*Option) Mapper

func (o *Option) Mapper(opts options.OptionSetProvider, path func(interface{}) string, mapper processing.MappingFunction) processing.MappingFunction

func (*Option) Usage

func (o *Option) Usage() string

Jump to

Keyboard shortcuts

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