https://github.com/treasersimplifies/cstr
colorful string printing in your console
https://github.com/treasersimplifies/cstr
color golang logging printing string
Last synced: 2 months ago
JSON representation
colorful string printing in your console
- Host: GitHub
- URL: https://github.com/treasersimplifies/cstr
- Owner: treasersimplifies
- Created: 2020-12-16T13:30:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T14:31:00.000Z (over 4 years ago)
- Last Synced: 2025-02-14T23:27:45.974Z (4 months ago)
- Topics: color, golang, logging, printing, string
- Language: Go
- Homepage:
- Size: 1.19 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Colorful String
Dye your string with color when printing it.
Are you a programmer willing to try something new?
Are you bored with you single-color command line output text(like the following)?

Are you looking for decorations for your command line tool?
This package will show you this:

## Example
```shell
$ git clone [email protected]:treasersimplifies/cstr.git
$ cd cstr
$ go test
```and you will see:

## Installation
To install cstr package, you need to install Go first.
Install cstr:
```shell
go get github.com/treasersimplifies/cstr
# or:
go get -u github.com/treasersimplifies/cstr@master
```
Import cstr in your code:```go
import "github.com/treasersimplifies/cstr"
```Use in code:
```go
fmt.Println(cstr.Dye("This is a Red string.....", "Red"))
fmt.Println(cstr.DyeColorfully("THIS IS A COLORFUL STRING...........\n", []string{"Red", "Green", "Yellow", "Blue", "Pink", "Skyblue", "White"}))```