Skip to content
/ cfmt Public

A lightweight packaging library for outputting color text on the terminal

License

Notifications You must be signed in to change notification settings

zhangboqi/cfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cfmt

Apache license Go Version

README | 中文文档

A lightweight packaging library for outputting color text on the terminal

Install

go get github.com/zhangboqi/cfmt

Usage

package main
import "github.com/zhangboqi/cfmt"

func main(){
	// green
	cfmt.Gprintln("green")

	// red
	cfmt.Rprintln("red")

	// yellow
	cfmt.Yprintln("yellow")

}

Custom

package main

import (
	"github.com/zhangboqi/cfmt"
)

func main() {
	bfmt := cfmt.New(cfmt.CODE_DEFAULT, cfmt.BG_BLACK, cfmt.FG_BLUE)
	bfmt.Println("Blue")
}

About

A lightweight packaging library for outputting color text on the terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages