banner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package banner provides responsive startup banner printing Per AI.md PART 7: BINARY REQUIREMENTS - Common Go Modules

Index

Constants

This section is empty.

Variables

View Source
var ArtLarge = []string{
	"  ___  ___  __ _ _ __ ___| |__  ",
	" / __|/ _ \\/ _` | '__/ __| '_ \\ ",
	" \\__ \\  __/ (_| | | | (__| | | |",
	" |___/\\___|\\__,_|_|  \\___|_| |_|",
}

ArtLarge is the large ASCII art (80+ cols)

View Source
var ArtMedium = []string{
	" ___ ___ __ _ _ __ ___| |__ ",
	"/ __|/ _ \\ _` | '__/ __| '_ \\",
	"\\__ \\  __/ (_| | | | (__| | | |",
	"|___/\\___|\\__,_|_|  \\___|_| |_|",
}

ArtMedium is the medium ASCII art (60-79 cols)

View Source
var ArtSmall = []string{
	"  ___ ___ __ _ _ __ ___| |__ ",
	" / __|/ _ \\ _` | '__/ __| '_ \\",
	" \\__ \\  __/_| | | (__| | | |",
	" |___/\\___|_| |_|  \\___|_| |_|",
}

ArtSmall is the small ASCII art (40-59 cols)

Functions

func CenterArt

func CenterArt(art []string, width int) []string

CenterArt centers ASCII art within the given width

func GetArt

func GetArt(cols int) []string

GetArt returns the appropriate ASCII art for the given width

func GetArtWidth

func GetArtWidth(art []string) int

GetArtWidth returns the width of the ASCII art

func Print

func Print(cfg Config)

Print prints the banner based on terminal size Per AI.md PART 7 and PART 14: Console Output (First Run)

func PrintError

func PrintError(err error)

PrintError prints error message

func PrintInfo

func PrintInfo(msg string)

PrintInfo prints info message

func PrintShutdown

func PrintShutdown(appName string)

PrintShutdown prints shutdown message

func PrintSuccess

func PrintSuccess(msg string)

PrintSuccess prints success message

func PrintWarning

func PrintWarning(msg string)

PrintWarning prints warning message

Types

type Config

type Config struct {
	AppName     string
	Version     string
	Mode        string // production/development
	Debug       bool
	URLs        []string // Listen URLs
	ShowSetup   bool     // Show setup token (server only, first run)
	SetupToken  string
	AdminPath   string
	Description string
	SMTPStatus  string // SMTP status (e.g., "Auto-detected (localhost:25)")
}

Config holds banner configuration

Jump to

Keyboard shortcuts

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