cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP  = "lj"
	VER  = "0.1.0"
	DESC = "Tool for viewing JSON logs"
)

Basic utility info

View Source
const (
	OPT_PAGER    = "P:pager"
	OPT_FOLLOW   = "F:follow"
	OPT_NO_COLOR = "nc:no-color"
	OPT_HELP     = "h:help"
	OPT_VER      = "v:version"

	OPT_VERB_VER     = "vv:verbose-version"
	OPT_COMPLETION   = "completion"
	OPT_GENERATE_MAN = "generate-man"
)

Options

View Source
const (
	COND_POSITIVE uint8 = 0
	COND_NEGATIVE uint8 = 1
	COND_CONTAINS uint8 = 2
	COND_LESS     uint8 = 3
	COND_GREATER  uint8 = 4
)

Variables

This section is empty.

Functions

func Run

func Run(gitRev string, gomod []byte)

Run is main utility function

Types

type Filter added in v0.1.0

type Filter struct {
	Key   string
	Value any
	Cond  uint8
}

Filter is input filter

type Filters added in v0.1.0

type Filters []Filter

Filters is a slice of filters

func (Filters) IsMatch added in v0.1.0

func (f Filters) IsMatch(fields map[string]gjson.Result) bool

IsMatch checks if json record fields match filters

Jump to

Keyboard shortcuts

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