Skip to content

nanobox-io/nanobox-golang-stylish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nanobox Stylish

A stylish little library that styles output according to the nanobox style guide (http://nanodocs.gopagoda.io/engines/style-guide/)

Installation

Frist go get the project...

go get github.com/nanobox-io/nanobox-golang-stylish

...then include the library in your project

include github.com/nanobox-io/nanobox-golang-stylish

Usage

Available styles:

  • ProcessStart(process string)
  • ProcessEnd(process string)
  • Bullet(bullet string/[]string{"bullet", "bullet"...})
  • Warning(body string)
  • Fatal(header, body string)

For detailed information see the complete documentation

Examples

Processes

stylish.ProcessStart("i am a process")
// process output
stylish.ProcessEnd()

// outputs
+ I am a process ------------------------------------------------------------ >
// process output

Bullets

single bullet
stylish.Bullet("i am a bullet")

// outputs
+ i am a bullet
multiple bullets
stylish.Bullet([]string{"we", "are", "many", "bullets"})

// outputs
+ we
+ are
+ many
+ bullets

Warnings

stylish.Warning("i am a warning")

// outputs
----------------------------------  WARNING  ----------------------------------
i am a warning

Errors

stylish.Error("i am an error", "things are probably going to explode now")

// outputs
:::::::::::::::::::::: I AM AN ERROR!!!

things are probably going to explode now

:::::::::::::::::::::::::::::::::::::::

Documentation

Complete documentation is available on godoc.

About

A stylish little library that styles output according to the nanobox style guide (http://nanodocs.gopagoda.io/engines/style-guide/)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages