rootcmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEntries error = cmdutil.NewErrorWithExitCode(errors.New("no entries selected"), 1)

Functions

This section is empty.

Types

type Command

type Command struct {
	FieldCount     int                  `name:"field-count" help:"Limit the number of fields extracted per entry."`
	FieldSeparator *FieldSeparatorValue `` /* 227-byte string literal not displayed */
	Read           io.Reader            `name:"read-from" short:"i" placeholder:"PATH" type:"path" help:"Read entries from file or path. Default is stdin."`
	Write          io.Writer            `name:"write-to" short:"o" placeholder:"PATH" type:"path" help:"Write selected entries to file or path. Default is stdout."`
	WriteFormat    *WriteFormatValue    `` /* 173-byte string literal not displayed */
	Policies       PolicyValueList      `` /* 131-byte string literal not displayed */
	Invert         bool                 `` /* 162-byte string literal not displayed */
	TimeFormat     *TimeFormatValue     `` /* 350-byte string literal not displayed */
	TimeField      int                  `name:"time-field" placeholder:"INT" help:"Field number containing the time, such as 1 for the first field."`
}

func (*Command) BeforeApply

func (cmd *Command) BeforeApply() error

func (*Command) Run

func (cmd *Command) Run(app *kong.Kong, appOptions *cmdutil.AppOptions) error

type FieldSeparatorValue

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

func (*FieldSeparatorValue) Decode

func (v *FieldSeparatorValue) Decode(ctx *kong.DecodeContext) error

type PolicyValueList

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

func (*PolicyValueList) Decode

func (v *PolicyValueList) Decode(ctx *kong.DecodeContext) error

type TimeFormatValue

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

func (*TimeFormatValue) Decode

func (v *TimeFormatValue) Decode(ctx *kong.DecodeContext) error

type WriteFormatValue

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

func (*WriteFormatValue) Decode

func (v *WriteFormatValue) Decode(ctx *kong.DecodeContext) error

Jump to

Keyboard shortcuts

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