display

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONFormat  = "json"
	HumanFormat = "human"
)

Variables

This section is empty.

Functions

func CountryCodeToFlagEmoji

func CountryCodeToFlagEmoji(code string) string

func GetLevelStyle

func GetLevelStyle(style lipgloss.Style, level string) lipgloss.Style

func GetPercentKnownColor

func GetPercentKnownColor(style lipgloss.Style, percent float64) lipgloss.Style

func GetReputationStyle

func GetReputationStyle(style lipgloss.Style, reputation string) lipgloss.Style

func PrintSection

func PrintSection(sectionStyle *pterm.Style, section string)

func TruncateWithEllipsis

func TruncateWithEllipsis(s string, max int) string

Types

type Display

type Display struct {
}

func NewDisplay

func NewDisplay() *Display

func (*Display) DisplayIP

func (d *Display) DisplayIP(item *cticlient.SmokeItem, ipLastRefresh time.Time, format string, detailed bool) error

func (*Display) DisplayReport

func (d *Display) DisplayReport(item *models.Report, stats *models.ReportStats, format string, withIPs bool) error

type KV

type KV struct {
	Key   string
	Value int
}

type RowDisplay

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

func NewRowDisplay

func NewRowDisplay(writer *tabwriter.Writer, maxSpace int) *RowDisplay

func (*RowDisplay) PrintRow

func (r *RowDisplay) PrintRow(key string, value string, keyStyle lipgloss.Style, valueStyle lipgloss.Style)

func (*RowDisplay) PrintValue

func (r *RowDisplay) PrintValue(value string, style lipgloss.Style)

Jump to

Keyboard shortcuts

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