style

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirectionUp    direction = "A"
	DirectionDown  direction = "B"
	DirectionRight direction = "C"
	DirectionLeft  direction = "D"
)
View Source
const (
	OperationSave          operation = "s"
	OperationRestore       operation = "u"
	OperationClear         operation = "2J"
	OperationClearLineTail operation = "K"
	OperationHide          operation = "?25l"
	OperationDisplay       operation = "?25h"
)

Variables

This section is empty.

Functions

func Blue

func Blue(s string) string

func Gray

func Gray(s string) string

func Green

func Green(s string) string

func LightGreen

func LightGreen(s string) string

func Move added in v1.0.6

func Move(n int, direction direction) string

func Purple

func Purple(s string) string

func Red

func Red(s string) string

func RedBackground

func RedBackground(s string) string

func SetPosition added in v1.0.6

func SetPosition(x, y int) string

func StyleFormat added in v1.0.6

func StyleFormat(s string, styles ...Style) string

func Yellow

func Yellow(s string) string

Types

type Style

type Style int
const (
	DecorationNormal Style = iota
	DecorationBold
	DecorationItalic
	DecorationUnderline
)
const (
	ColorBlack Style = 30 + iota
	ColorRed
	ColorGreen
	ColorYellow
	ColorBlue
	ColorPurple
	ColorLightGreen
	ColorGray
)
const (
	BackGroundBlack Style = 40 + iota
	BackgroundRed
	BackgroundGreen
	BackgroundYellow
	BackgroundBlue
	BackgroundPurple
	BackgroundLightGreen
	BackgroundGray
)

func (Style) String added in v1.0.6

func (d Style) String() string

Jump to

Keyboard shortcuts

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