Skip to content

Latest commit

 

History

History
59 lines (37 loc) · 1.18 KB

README.md

File metadata and controls

59 lines (37 loc) · 1.18 KB

gocolor

Goでコンソールに出力する文字色を変えれます。

Change the color of characters output to the console with Go.

How to use

Install

go get github.com/code-raisan/gocolor@latest

Sample

gocolor.Default() を使用すると通常の文字色に戻すことができます

色文字の出力例

package main

import (
	"github.com/code-raisan/gocolor"
)

func main() {
    // Out put is red
    println(gocolor.Red("gocolor.Red()"))
	
    // Out put is blue
    println(gocolor.Blue("gocolor.Blue()"))
	
    // Out put is yellow
    println(gocolor.Yellow("gocolor.Yellow()"))
	
    // Out put is green
    println(gocolor.Green("gocolor.Green()"))
	
    // Out put is purple(magenta)
    println(gocolor.Purple("gocolor.Purple()"))
	
    // Out put is cyan
    println(gocolor.Cyan("gocolor.Cyan()"))
	
    // Out put is white
    println(gocolor.White("gocolor.White()"))
	
    // Out put is black
    println(gocolor.Black("gocolor.Black()"))
}

image