gprint

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 6 Imported by: 5

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 added in v0.4.3

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 added in v0.4.3

type BOption func(bp *BlockPrinter)

func WithAlign added in v0.4.3

func WithAlign(position lipgloss.Position) BOption

func WithBackground added in v0.4.3

func WithBackground(lightColor, darkColor string) BOption

func WithBold added in v0.4.3

func WithBold(bold bool) BOption

func WithForeground added in v0.4.3

func WithForeground(color string) BOption

func WithHeight added in v0.4.3

func WithHeight(height int) BOption

func WithItalic added in v0.4.3

func WithItalic(italic bool) BOption

func WithPadding added in v0.4.3

func WithPadding(i ...int) BOption

func WithWidth added in v0.4.3

func WithWidth(width int) BOption

type BlockPrinter added in v0.4.3

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

func NewBlockPrinter added in v0.4.3

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

func (*BlockPrinter) Println added in v0.4.3

func (that *BlockPrinter) Println()

func (*BlockPrinter) String added in v0.4.3

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