ui

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Color schemes
	SuccessColor = color.New(color.FgGreen, color.Bold)
	ErrorColor   = color.New(color.FgRed, color.Bold)
	WarningColor = color.New(color.FgYellow, color.Bold)
	InfoColor    = color.New(color.FgCyan)
	MutedColor   = color.New(color.FgHiBlack)
	BoldColor    = color.New(color.Bold)

	// DR (Domain Rating) color thresholds
	HighDRColor   = color.New(color.FgGreen)
	MediumDRColor = color.New(color.FgYellow)
	LowDRColor    = color.New(color.FgRed)
)

Functions

func Bold

func Bold(format string, args ...interface{})

Bold prints a bold message

func DisableColors

func DisableColors()

DisableColors disables colored output

func EnableColors

func EnableColors()

EnableColors enables colored output

func Error

func Error(format string, args ...interface{})

Error prints an error message

func FormatDR

func FormatDR(dr *int) string

FormatDR formats a domain rating with color

func FormatLinkType

func FormatLinkType(linkType string) string

FormatLinkType formats link type with color

func FormatPricing

func FormatPricing(pricing string) string

FormatPricing formats pricing type with color

func Info

func Info(format string, args ...interface{})

Info prints an info message

func Muted

func Muted(format string, args ...interface{})

Muted prints a muted message

func Success

func Success(format string, args ...interface{})

Success prints a success message

func TruncateString

func TruncateString(s string, maxLen int) string

TruncateString truncates a string to maxLen

func Warning

func Warning(format string, args ...interface{})

Warning prints a warning message

Types

type Table

type Table struct {
	// contains filtered or unexported fields
}

Table represents a simple table

func CreateTable

func CreateTable(headers []string) *Table

CreateTable creates a formatted table

func (*Table) Row

func (t *Table) Row(cols ...string)

Row adds a row to the table

func (*Table) String

func (t *Table) String() string

String renders the table

Jump to

Keyboard shortcuts

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