style

package module
v0.0.0-...-76ec47c Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const KEY_STYLE_COLOR = 1
View Source
const KEY_STYLE_NAME = 0
View Source
const KEY_STYLE_OPTION = 2

Variables

This section is empty.

Functions

func Hello

func Hello(name string) string

Hello returns a greeting for the named person.

Types

type Style

type Style struct {
	Name string
	// contains filtered or unexported fields
}

func NewStyleByDef

func NewStyleByDef(def string) *Style

func (*Style) Apply

func (s *Style) Apply(data string, format ...string) string

func (*Style) Echo

func (s *Style) Echo(data string, format ...string)

func (*Style) Printf

func (s *Style) Printf(format string, a ...any)

func (*Style) Sprintf

func (s *Style) Sprintf(format string, a ...any) string

type Styles

type Styles struct {
	List              map[string]*Style
	DefaultKeyStyle   string
	DefaultValStyle   string
	DefaultKeyPadding string
	DefaultIndent     string
}

func NewStyles

func NewStyles() *Styles

func (*Styles) Apply

func (s *Styles) Apply(name string, data string) string

func (*Styles) Echo

func (s *Styles) Echo(name string, data string)

func (*Styles) Keyval

func (s *Styles) Keyval(key string, val string, names ...string)

Jump to

Keyboard shortcuts

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