common

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintError

func PrintError(err error, statusOnError int) int

Types

type HeaderOpts added in v1.0.0

type HeaderOpts struct {
	NoHeader bool
}

func (*HeaderOpts) IsPrintHeader added in v1.0.0

func (opts *HeaderOpts) IsPrintHeader(args []string) bool

type HelpOptions added in v1.0.0

type HelpOptions struct {
	HelpFlag    bool
	VersionFlag bool
}

func (*HelpOptions) IsHelp added in v1.0.0

func (opts *HelpOptions) IsHelp() bool

type Options

type Options struct {
	Lines     int
	Bytes     int
	Keyword   string
	Predicate string
	TType     ptake.TakerType
	HeaderOpts
	HelpOptions
}

func New

func New() *Options

func (*Options) Int

func (opts *Options) Int() int

func (*Options) String

func (opts *Options) String() string

func (*Options) Validate

func (opts *Options) Validate() error

Jump to

Keyboard shortcuts

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