Documentation ¶
Index ¶
- func InitConfig(opts Options, builtins embed.FS) (*koanf.Koanf, error)
- func ParseOptions(args []string, opts interface{}) (*arg.Parser, error)
- func Run(reader io.Reader, writer io.StringWriter, config *koanf.Koanf, ...) error
- func SetGlobals(version, commit, date string)
- type CapGroup
- type CapGroupList
- type LogFormat
- type Options
- type Pattern
- type WordGroup
- type Words
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseOptions ¶
ParseOptions parses command-line options
func SetGlobals ¶
func SetGlobals(version, commit, date string)
Types ¶
type CapGroup ¶
type CapGroup struct { Pattern string `koanf:"pattern"` Foreground string `koanf:"fg"` Background string `koanf:"bg"` Style string `koanf:"style"` Alternatives CapGroupList `koanf:"alternatives"` Regexp *regexp.Regexp }
representation of one capture group in a config file
type LogFormat ¶
type LogFormat struct { Name string CapGroups CapGroupList Regexp *regexp.Regexp }
representation of log format
type Options ¶
type Options struct { ConfigPath string `arg:"-c, --config" help:"path to configuration file"` NoBuiltins bool `arg:"-n, --no-builtins" help:"disable built-in log formats and words"` }
Options stores the values of command-line options
Click to show internal directories.
Click to hide internal directories.