a cute Go print package, simple, no dependencies!
go get -u github.com/zakaria-chahboun/cute
The idea is to simplify the printing of messages in the terminal, exactly in case of error. Letting you to put a title for your message in different colors.
cute.Println("Hi everyone", "My name is Zakaria!")
Screenshot
As you see the default color for the title is
yellow
and for the message ispurple
.
cute.Println("Hi everyone", "My name is Zakaria!", "Zaki is my nick name.")
Screenshot
// equal to (if error != nil)
cute.Check("Error", errors.New("This is a cute panic!"))
Screenshot
You can change the colors:
- NoColor
- ColorRed
- ColorYellow
- ColorGreen
- ColorBlue
- ColorPurple
- ColorCyan
- ColorWhite
cute.SetTitleColor(cute.ColorBlue)
cute.SetMessageColor(cute.ColorGreen)
cute.Println("Hi everyone", "My name is Zakaria!")
Screenshot
cute.Printf("Another title", "%s, a Country in North Africa.\n", "Morocco")
Screenshot
Twitter: @Zaki_Chahboun