format

package
v0.0.0-...-71d99d6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// based on https://github.com/silofy/hackthebox/tree/master
	// Base background color
	BaseBG = lipgloss.Color("#141D2B")

	// Primary palette
	Purple     = lipgloss.Color("#A4B1CD")
	Red        = lipgloss.Color("#FF8484")
	Cyan       = lipgloss.Color("#5CECC6")
	Pink       = lipgloss.Color("#FFB3DE") // replaced
	Yellow     = lipgloss.Color("#FFCC5C")
	LightBlue  = lipgloss.Color("#C5D1EB")
	Blue       = lipgloss.Color("#5CB2FF")
	LightGreen = lipgloss.Color("#C5F467")
	DarkPurple = lipgloss.Color("#A000FF")

	// Optional: Text color for dark backgrounds (use primary palette for accents)
	TextDefault    = Purple
	TextRed        = Red
	TextCyan       = Cyan
	TextPink       = Pink
	TextYellow     = Yellow
	TextLightBlue  = LightBlue
	TextBlue       = Blue
	TextLightGreen = LightGreen
	TextTitle      = LightGreen
	TextPurple     = DarkPurple
)
View Source
var ColorIndex = 0
View Source
var TaskResult any

Functions

func BoxState

func BoxState(state string) (color string)

func CheckDiff

func CheckDiff(difficulty string) (color string)

func CheckOS

func CheckOS(BoxOS string) (color string)

func HTBTheme

func HTBTheme() *huh.Theme

func HelpTask

func HelpTask(task Task, args any) tea.Cmd

func InitialLoadingModel

func InitialLoadingModel(task Task, args any) loading

func LoadImage

func LoadImage(url string) (out string)

func NextColor

func NextColor() lipgloss.Color

func RunLoading

func RunLoading(task Task, args any) (err error)

func Sanitize

func Sanitize(inputStr string) string

func SplitResp

func SplitResp() (resp string)

Types

type Task

type Task func(any) any

Jump to

Keyboard shortcuts

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