templates

package
v1.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Use     bool
	Pattern string
}

type Placeholder

type Placeholder struct {
	LogTime          time.Time
	LogLevel         misc.Level
	LogSource        string
	LogContextFields field.Fields
	LogFields        []field.Field
	LogMessage       string
}

type Template

type Template struct {
	Tmpl *template.Template
	Mode misc.ParseMode
}

func DefaultTemplate

func DefaultTemplate(mode misc.ParseMode) *Template

func FromPattern

func FromPattern(pattern string) (*Template, error)

func (*Template) Render

func (tmpl *Template) Render(placeholder *Placeholder) (string, error)

Jump to

Keyboard shortcuts

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