mirror of
https://github.com/KevinMidboe/motdGOi.git
synced 2025-10-29 01:30:25 +00:00
edfcb18a11e459b27d5f962e91b762ee57c9cf04
FIGlet for Go
Currently in Development.
Sould work but will be improved (add demos, better font adding, maybe better performance, more default fonts)
A port of figlet to golang and fork of getwe/figlet4go.
Installation
go get -u github.com/probandula/figlet4go
Usage
// Create the renderer
ascii := figlet4go.NewAsciiRender()
// Optional: Add color to the letters (https://github.com/fatih/color needed)
// Render and print the string
renderStr, _ := ascii.Render("Hello World")
fmt.Print(renderStr)
Default font
The default font is built into the bindata.go file with the tool go-bindata.
The bash script for building the default font is stored in tools/ (go-bindata must be installed).
Use the demo
There are demo programs for trying out the library.
To run them, cd into the demo/ directory and run go run [filename] on any program you want to run.
Languages
Go
97.3%
Makefile
1.9%
Shell
0.8%
