🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/mitchellh/colorstring

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mitchellh/colorstring

v0.0.0-20190213212951-d06e56a500db
Source
Go
Version published
Created
Source

colorstring Build Status

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.

FAQs

Package last updated on 13 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts