GoStyle

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 1 Imported by: 0

README

GoStyle

Best Looking Windows Color Library made for Go users! Showcase

GoStyle Functions

  • Sample README that provides documentation for the functions in the GoStyle package.

Init() error

  • Description: Initializes the console, comes with simple error handle.
  • Sample Usage:
if err := gostyle.Init(); err != nil {
    gostyle.Write("Failed to init console:", gostyle.RED_TO_BLACK, false)
    return
}

ClearConsole()

  • Description: Clears the console. Anything currently displayed will be removed.
  • Sample Usage:
gostyle.ClearConsole()

HideCursor()

  • Description: Hides the console cursor.
  • Sample Usage:
gostyle.HideCursor()

ShowCursor()

  • Description: Shows the console cursor.
  • Sample Usage:
gostyle.ShowCursor()

Write(text string, gradient gostyle.Gradient, true/false)

  • Description: Writes text to the console with an optional gradient and centers it based on your choice.
  • Parameters:
    • text string: Text to be written to the console.
    • gradient gostyle.Gradient: Optional gradient color for the text.
    • true: You Decide if it should be in center set true or false based on if you want the text to be centered or not.
  • Sample Usage:
gostyle.Write("Your text here", gostyle.PURPLE_TO_BLUE, true)

WriteColorized(text string, color string, true/false)

  • Description: Writes text to the console with a specified color and centers it based on your choice.
  • Parameters:
    • text string: Text to be written to the console.
    • color string: Color of the text (e.g., "red", "blue").
    • true: You Decide if it should be in center set true or false based on if you want the text to be centered or not.
  • Sample Usage:
gostyle.WriteColorized("Your text here", "red", true)

WriteAscii(text string, gradient gostyle.Gradient, true/false)

  • Description: Writes ASCII art to the console with an optional gradient and centers it based on your choice.
  • Parameters:
    • text string: ASCII art to be written to the console.
    • gradient gostyle.Gradient: Optional gradient color for the ASCII art.
    • true: You Decide if it should be in center set true or false based on if you want the text to be centered or not.
  • Sample Usage:
gostyle.WriteAscii("Your ASCII art here", gostyle.PURPLE_TO_BLUE, true)

Remember to import the gostyle package before using these functions.

Credits:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL