l

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LogColorGreen string = "\033[32m"
View Source
const LogColorRed string = "\033[31m"
View Source
const LogColorReset string = "\033[0m"

Variables

This section is empty.

Functions

func CurFuncName

func CurFuncName() string

Types

type LogBuilder

type LogBuilder struct {
	Sb        *strings.Builder
	IsVerbose bool
	Header    string
	StartTs   time.Time
}

func NewLogBuilder

func NewLogBuilder(header string, isVerbose bool) *LogBuilder

func (*LogBuilder) Add

func (lb *LogBuilder) Add(content string)

func (*LogBuilder) AddAlways added in v0.0.3

func (lb *LogBuilder) AddAlways(content string)

func (*LogBuilder) AddObject

func (lb *LogBuilder) AddObject(content string, o any)

func (*LogBuilder) Complete

func (lb *LogBuilder) Complete(err error) (LogMsg, error)

type LogMsg

type LogMsg string

Jump to

Keyboard shortcuts

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