fmt

package
v0.0.0-...-5bb4afb Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Green   = color.New(color.FgGreen, color.Bold).SprintFunc()
	Cyan    = color.New(color.FgCyan, color.Bold).SprintFunc()
	Magenta = color.New(color.FgMagenta, color.Bold).SprintFunc()
	Yellow  = color.New(color.FgYellow, color.Bold).SprintFunc()
	Red     = color.New(color.FgRed, color.Bold).SprintFunc()
	Blue    = color.New(color.FgBlue, color.Bold).SprintFunc()
)
View Source
var (
	// Print with color
	Print                = Printer(rawPrint)
	Printf               = Printer(rawPrint)
	PrintWithFile        = Printer(rawPrint).PrependFile()
	PrintWithFileAndTime = Printer(rawPrint).PrependTime().PrependFile()
	// PrintJSON complex value to json with color
	PrintJSON = Printer(rawPrintJSON)
	// PrintWithTime print with time
	PrintWithTime = Printer(rawPrint).PrependTime()
	// PrintJSONWithTime print with time
	PrintJSONWithTime = Printer(rawPrintJSON).PrependTime()
)

Functions

func PrintObject

func PrintObject(v interface{})

PrintObject with color

func Println

func Println(args ...interface{})

Types

type Printer

type Printer func(format string, args ...interface{})

func (Printer) PrependFile

func (p Printer) PrependFile() Printer

func (Printer) PrependTime

func (p Printer) PrependTime() Printer

Jump to

Keyboard shortcuts

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