logtheme

package module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Theme

type Theme struct {
	// Name is the name of the theme.
	Name string

	// Default is the default variant of the theme.
	Default Variant

	// Variants are the different styles that exists for a specific theme. These
	// are the standard styles and themes might allow you to customise them
	// further if you use them directly.
	Variants []Variant
}

Theme represents a theme and its variants.

func New

func New(name string, def Variant, variants []Variant) Theme

New creates a new theme with the given name and variants.

type Variant

type Variant struct {
	// Name is the name of the flavour.
	Name string

	// Background is the background color of the flavour. This is only used while
	// rendering the example asset for the flavour.
	Background string

	// Styles are the actual styles that are used to render the log lines.
	Styles *log.Styles
}

Variant represents a single style within a theme.

Jump to

Keyboard shortcuts

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