vikpe / prettyfmt

Go fmt with colored prefix and timestamp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prettyfmt Test codecov Go Report Card

Go fmt with colored prefix and timestamp

go get github.com/vikpe/prettyfmt

Synopsis

Colors from github.com/fatih/color (list of values)

New(
  prefix          string,
  prefixColor     color.Attribute, 
  timestampFormat string, 
  timestampColor  color.Attribute
)

Usage

pfmt := prettyfmt.New("chatbot", color.FgHiBlue, "15:04:05", color.FgWhite)
pfmt.Println("start")
pfmt.Printfln("connected as %s", "vikpebot")

image

About

Go fmt with colored prefix and timestamp.


Languages

Language:Go 100.0%