gprint

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 39

Documentation

Index

Constants

View Source
const (
	HintInfo    string = "  INFO   "
	HintSuccess string = " SUCCESS "
	HintWarning string = " WARNING "
	HintError   string = "  ERROR  "
	HintFatal   string = "  FATAL  "
)

Variables

This section is empty.

Functions

func Blue

func Blue(format string, v ...any)

func BlueStr

func BlueStr(format string, v ...any) string

func Brown

func Brown(format string, v ...any)

func BrownStr

func BrownStr(format string, v ...any) string

func Cyan

func Cyan(format string, v ...any)

func CyanStr

func CyanStr(format string, v ...any) string

func Gray

func Gray(format string, v ...any)

func GrayStr

func GrayStr(format string, v ...any) string

func Green

func Green(format string, v ...any)

func GreenStr

func GreenStr(format string, v ...any) string

func Magenta

func Magenta(format string, v ...any)

func MagentaStr

func MagentaStr(format string, v ...any) string

func Orange

func Orange(format string, v ...any)

func OrangeStr

func OrangeStr(format string, v ...any) string

func Pink

func Pink(format string, v ...any)

func PinkStr

func PinkStr(format string, v ...any) string

func PrintError

func PrintError(format string, v ...any)

func PrintFatal

func PrintFatal(format string, v ...any)

func PrintInfo

func PrintInfo(format string, v ...any)

func PrintSuccess

func PrintSuccess(format string, v ...any)

func PrintWarning

func PrintWarning(format string, v ...any)

func PrintlnByDefault

func PrintlnByDefault(content string)

func Red

func Red(format string, v ...any)

func RedStr

func RedStr(format string, v ...any) string

func Rose

func Rose(format string, v ...any)

func RoseStr

func RoseStr(format string, v ...any) string

func White

func White(format string, v ...any)

func WhiteStr

func WhiteStr(format string, v ...any) string

func Yellow

func Yellow(format string, v ...any)

func YellowStr

func YellowStr(format string, v ...any) string

Types

type BOption

type BOption func(bp *BlockPrinter)

func WithAlign

func WithAlign(position lipgloss.Position) BOption

func WithBackground

func WithBackground(lightColor, darkColor string) BOption

func WithBold

func WithBold(bold bool) BOption

func WithForeground

func WithForeground(color string) BOption

func WithHeight

func WithHeight(height int) BOption

func WithItalic

func WithItalic(italic bool) BOption

func WithPadding

func WithPadding(i ...int) BOption

func WithWidth

func WithWidth(width int) BOption

type BlockPrinter

type BlockPrinter struct {
	Style *lipgloss.Style
	// contains filtered or unexported fields
}

func NewBlockPrinter

func NewBlockPrinter(content string, opts ...BOption) (bp *BlockPrinter)

func (*BlockPrinter) Println

func (that *BlockPrinter) Println()

func (*BlockPrinter) String

func (that *BlockPrinter) String() string

type FadeColors

type FadeColors struct {
	ColorA *colorful.Color
	ColorB *colorful.Color
	// contains filtered or unexported fields
}

func NewFadeColors

func NewFadeColors(content any) *FadeColors

func (*FadeColors) Println

func (that *FadeColors) Println()

func (*FadeColors) SetDefaultRange

func (that *FadeColors) SetDefaultRange()

func (*FadeColors) SetRange

func (that *FadeColors) SetRange(colorA, colorB string)

func (*FadeColors) String

func (that *FadeColors) String() string

Jump to

Keyboard shortcuts

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