Skip to content

d5/cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cc

GoDoc

Colorize terminal output.

package main

import (
	"log"
	"github.com/d5/cc"
)

func main() {
	log.Printf("Enabled: %v", cc.Enabled())
	log.Printf(cc.Red("red") + " and " + cc.Blue("blue"))
	log.Printf("%s - %s", cc.BgWhite(cc.Blue("foo")), cc.BgRed(cc.Yellow("bar")))
	log.Printf(cc.Underline(cc.Bold("bold-underline")))
}

console output

Features

  • Clean and simple API
  • Windows support
  • Auto-detect coloring support

Install

go get github.com/d5/cc