banner

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package banner provides the figlet + lolcat startup banner shared between the CLI REPL and the TUI.

The rainbow coloring algorithm is vendored from github.com/flaviocopes/gololcat (which is package main and not importable as a library).

Index

Constants

View Source
const Title = "yaah"

Variables

This section is empty.

Functions

func Generate

func Generate() (string, int)

Generate renders "yaah" as figlet ASCII art with lolcat rainbow coloring, followed by the tagline and subtitle. Picks a random font from the curated list on each call. Returns the styled banner string and its line count. Falls back to plain "yaah" if figlet fails. Respects the NO_COLOR environment variable.

func GeneratePlain added in v0.45.0

func GeneratePlain() (art string, tagline string, lineCount int)

GeneratePlain renders "yaah" as plain figlet ASCII art (no ANSI coloring) plus a random tagline. Returns the art, the tagline, and the line count.

Use this when you need to apply your own color markup (e.g. tview color tags) instead of ANSI escape codes — call LolcatRGB for each character index to get the same rainbow gradient.

func Lolcat added in v0.6.1

func Lolcat(art string) string

Lolcat applies lolcat rainbow coloring to arbitrary ASCII art text. Each character receives an RGB color from the sine-wave algorithm. Respects the NO_COLOR environment variable.

func LolcatRGB added in v0.45.0

func LolcatRGB(i int) (int, int, int)

lolcatRGB maps a character index to an RGB triple using the same sine-wave algorithm as gololcat / the original lolcat. LolcatRGB maps a character index to a rainbow RGB triple (same algorithm used by Lolcat). Useful for consumers that need to apply their own color markup (e.g. tview color tags instead of ANSI escape codes).

func Render

func Render(version string) string

Render returns the full CLI startup banner: figlet art with subtitle, a dim version line, and trailing blank lines. Respects NO_COLOR.

Types

This section is empty.

Jump to

Keyboard shortcuts

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