Skip to content

Alekzandre/golorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golorize

Golorize is a small package that makes your go experience more colorfull.

It's in Google's Go language to colorize your syntax.

####To install the package make sure your $GOPATH is correctly set.

go get "github.com/Alekzandre/golorize"

####Exemple:

package main

import (
	glz "github.com/Alekzandre/golorize"
)

func main() {
	// init a new Golorize
	gz := glz.NewGolorize()
	// func (g Golorize) Color(s string, options ...string)
	// Color("your text", io.Writer, police, foreground_color, background_color)
	gz.Color("basic on Stdout")
	gz.Color("basic on Stderr", "2")
	gz.Color("underlined", "1", glz.UNDERLINED)
	gz.Color("bold and yellow", "1", glz.BOLD, glz.F_YELLOW)
	gz.Color("reversed so red on cyan background", "1", glz.REVERSE, glz.F_CYAN, glz.B_RED)
	gz.Color("It makes errors more flashy", "2", glz.BOLD, glz.F_RED, glz.B_BLUE)
}

out_example01

####Features to come: Improve the code.

Make it easier to use.

About

small package to make all your prints prettier <3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages