/cute

a simple beautiful go print

Primary LanguageGoMIT LicenseMIT

Cute Print

a cute Go print package, simple, no dependencies!

Installation

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.

Print line

	cute.Println("Hi everyone", "My name is Zakaria!")

Screenshot

print line

As you see the default color for the title is yellow and for the message is purple.

Print muti-lines

	cute.Println("Hi everyone", "My name is Zakaria!", "Zaki is my nick name.")

Screenshot

print line

Check error

    // equal to (if error != nil)
	cute.Check("Error", errors.New("This is a cute panic!"))

Screenshot

print line

Change colors

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

print line

Printf

	cute.Printf("Another title", "%s, a Country in North Africa.\n", "Morocco")

Screenshot

print line


Twitter: @Zaki_Chahboun