fmt

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISO = "2006-01-02T15:04:05.999Z"
)
View Source
const RESET = "\x1B[0m"

Variables

View Source
var (
	Red    = Style{/* contains filtered or unexported fields */}
	Green  = Style{/* contains filtered or unexported fields */}
	Yellow = Style{/* contains filtered or unexported fields */}
	Blue   = Style{/* contains filtered or unexported fields */}
	Purple = Style{/* contains filtered or unexported fields */}
)
View Source
var JSON = FormatEvent(jsonEvent)

Functions

func Full

func Full(f Format, w *SyncWriter, event logger.Record) error

func GoRoutineID

func GoRoutineID() string

func SupportsAnsi

func SupportsAnsi(w io.Writer) bool

Types

type Format

type Format struct {
	Format             FormatEvent
	DisplayGoroutineId bool
}

func (Format) FormatEvent

func (f Format) FormatEvent(w *SyncWriter, event logger.Record) error

type FormatEvent

type FormatEvent = func(Format, *SyncWriter, logger.Record) error

type Style

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

func (Style) Dimmed

func (s Style) Dimmed() Style

func (Style) IsPlain

func (s Style) IsPlain() bool

func (Style) Paint

func (s Style) Paint(m string) string

type SyncWriter

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

func NewSyncWriter

func NewSyncWriter(w io.Writer) *SyncWriter

func (*SyncWriter) HasAnsiSupport

func (w *SyncWriter) HasAnsiSupport() bool

func (*SyncWriter) Write

func (w *SyncWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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