renderer

package
v0.0.0-...-8e721ac Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicRenderer

type BasicRenderer struct {
	// contains filtered or unexported fields
}

BasicRenderer is an implementation of the Renderer interface

func NewBasicRenderer

func NewBasicRenderer(opts ...BasicRendererOptions) *BasicRenderer

func (*BasicRenderer) Render

func (br *BasicRenderer) Render(output string, condensed bool) string

type BasicRendererOptions

type BasicRendererOptions func(br *BasicRenderer)

func WithPrimaryColor

func WithPrimaryColor(color string) BasicRendererOptions

func WithSecondaryColor

func WithSecondaryColor(color string) BasicRendererOptions

func WithStyle

func WithStyle(style ansi.StyleConfig) BasicRendererOptions

type Renderer

type Renderer interface {
	// Render takes in a string to render and output to the console
	Render(output string, condensed bool) string
}

Renderer is an interface that is used to render output for a logger

Jump to

Keyboard shortcuts

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