logs

package
v0.0.0-...-1a228dc Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prettifier

type Prettifier struct {
	LineLengthLimit    int
	CharsAroundPattern int
}

func DefaultPrettifier

func DefaultPrettifier() *Prettifier

DefaultPrettifier creates a default Prettifier.

func (*Prettifier) Prettify

func (p *Prettifier) Prettify(line, pattern string) string

Prettify shortens the line and colors the pattern occurrences.

func (*Prettifier) Shorten

func (p *Prettifier) Shorten(line, pattern string) string

Shorten shortens the provided line to make it human readable. It respects the provided pattern in a sense that the pattern will be always present in the result.

Jump to

Keyboard shortcuts

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