Binbiubiubiu / co

The library for terminal output formatting with ANSI colors

Home Page:https://pkg.go.dev/github.com/Binbiubiubiu/co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

co

The library for terminal output formatting with ANSI colors

Install

$ go get -u github.com/Binbiubiubiu/co

Example

package main

import (
	. "github.com/Binbiubiubiu/co"
)

func main() {
	println(GreenBright("Hello"), BgCyanBright(RedBright("Binbiubiubiu")))
}

Bench

$ go test -bench=. 
goos: darwin
goarch: amd64
pkg: github.com/Binbiubiubiu/co
cpu: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Benchmark_co-8                   1986559               606.8 ns/op
Benchmark_fatih_color-8           534586              2065 ns/op
Benchmark_gookit_color-8         1463462               804.2 ns/op
PASS
ok      github.com/Binbiubiubiu/co      6.429s

Thanks

colorette 🌈Easily set your terminal text color & styles.

About

The library for terminal output formatting with ANSI colors

https://pkg.go.dev/github.com/Binbiubiubiu/co

License:MIT License


Languages

Language:Go 82.1%Language:TypeScript 14.1%Language:EJS 3.7%