GoLang colorized output library for Mac & Linux Shell, 中文版说明
$ go get github.com/bclicn/color
import "github.com/bclicn/color"
then call color.Test()
fmt.Println("Hello" + color.Red("World"))
to assemble a colorized outputcolor-test.go
color.go
package color
to package main
fmt.Println(Red("I'm red !!!"))
go run color.go yourScript.go
go build color.go yourScript.go
package main import ( "fmt" "github.com/bclicn/color" ) func main(){ fmt.Println(color.Red("Red output")) color.Test() }
bcli, 2018-7-11