options

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSortOption                  = "count"
	DefaultFormatOption                = "table"
	DefaultLimitOption                 = 5000
	DefaultOutputOption                = "simple"
	DefaultPaginationLimit             = 100
	DefaultLogLinePrefix               = "%m [%p]"
	DefaultPrintOutputOptionsSeparator = "\n"
)

Variables

View Source
var DefaultPercentilesOption = []int{}

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func BundleValues

func BundleValues(b bool) Option

func BundleWhereIn

func BundleWhereIn(b bool) Option

func CSVGroups

func CSVGroups(csv string) Option

func Dump added in v0.2.0

func Dump(s string) Option

func File

func File(s string) Option

func Filters

func Filters(s string) Option

func Format

func Format(s string) Option

func Limit

func Limit(i int) Option

func Load added in v0.2.0

func Load(s string) Option

func LogLinePrefix added in v0.2.0

func LogLinePrefix(s string) Option

func MatchingGroups

func MatchingGroups(values []string) Option

func NoAbstract

func NoAbstract(b bool) Option

func NoHeaders

func NoHeaders(b bool) Option

func NoSavePos

func NoSavePos(b bool) Option

func Output

func Output(s string) Option

func PaginationLimit

func PaginationLimit(i int) Option

func Percentiles

func Percentiles(i []int) Option

func PosFile

func PosFile(s string) Option

func Reverse

func Reverse(b bool) Option

func Separator added in v0.2.0

func Separator(s string) Option

func ShowFooters

func ShowFooters(b bool) Option

func Sort

func Sort(s string) Option

type Options

type Options struct {
	File            string   `mapstructure:"file"`
	Dump            string   `mapstructure:"dump"`
	Load            string   `mapstructure:"load"`
	Sort            string   `mapstructure:"sort"`
	Reverse         bool     `mapstructure:"reverse"`
	Format          string   `mapstructure:"format"`
	NoHeaders       bool     `mapstructure:"noheaders"`
	ShowFooters     bool     `mapstructure:"show_footers"`
	Limit           int      `mapstructure:"limit"`
	MatchingGroups  []string `mapstructure:"matching_groups"`
	Filters         string   `mapstructure:"filters"`
	PosFile         string   `mapstructure:"pos_file"`
	NoSavePos       bool     `mapstructure:"nosave_pos"`
	Output          string   `mapstructure:"output"`
	Percentiles     []int    `mapstructure:"percentiles"`
	BundleWhereIn   bool     `mapstructure:"bundle_where_in"`
	BundleValues    bool     `mapstructure:"bundle_values"`
	NoAbstract      bool     `mapstructure:"noabstract"`
	PaginationLimit int      `mapstructure:"pagination_limit"`
	LogLinePrefix   string   `mapstructure:"log_line_prefix"`
	Separator       string
}

func NewOptions

func NewOptions(opt ...Option) *Options

func SetOptions

func SetOptions(options *Options, opt ...Option) *Options

Jump to

Keyboard shortcuts

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