mirror of
https://github.com/hashicorp/colorstring
synced 2026-04-05 19:07:32 +00:00
No description
- Go 100%
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> |
||
|---|---|---|
| .travis.yml | ||
| colorstring.go | ||
| colorstring_test.go | ||
| go.mod | ||
| LICENSE | ||
| README.md | ||
colorstring 
colorstring is a Go library for outputting colored strings to a console using a simple inline syntax in your string to specify the color to print as.
For example, the string [blue]hello [red]world would output the text
"hello world" in two colors. The API of colorstring allows for easily disabling
colors, adding aliases, etc.
Installation
Standard go get:
$ go get github.com/mitchellh/colorstring
Usage & Example
For usage and examples see the Godoc.
Usage is easy enough:
colorstring.Println("[blue]Hello [red]World!")
Additionally, the Colorize struct can be used to set options such as
custom colors, color disabling, etc.