badge

package
v1.22.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultColor = "#9f9f9f" // Grey

)

Variables

Functions

This section is empty.

Types

type Badge

type Badge struct {
	Color    string
	FontSize int
	Label    Label
	Message  Message
}

func GenerateBadge

func GenerateBadge(label, message, color string) Badge

GenerateBadge generates badge with given template

func (Badge) Width

func (b Badge) Width() int

type Label

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

func (Label) Text

func (l Label) Text() string

func (Label) TextLength

func (l Label) TextLength() int

func (Label) Width

func (l Label) Width() int

func (Label) X

func (l Label) X() int

type Message

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

func (Message) Text

func (m Message) Text() string

func (Message) TextLength

func (m Message) TextLength() int

func (Message) Width

func (m Message) Width() int

func (Message) X

func (m Message) X() int

Jump to

Keyboard shortcuts

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