funcs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package funcs defines some functions to be used in templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTo

func AddTo(data map[string]any)

func AddToFuncs

func AddToFuncs(funcMap template.FuncMap)

func AddVarResolver

func AddVarResolver(funcMap template.FuncMap, e Expander)

Types

type Base64Funcs

type Base64Funcs struct{}

func (*Base64Funcs) Decode

func (f *Base64Funcs) Decode(in any) (string, error)

func (*Base64Funcs) Encode

func (f *Base64Funcs) Encode(in any) (string, error)

type Expander

type Expander = expander.Interface

type TermFuncs

type TermFuncs struct {
	ColorEnabled bool
}

func NewTermFuncs

func NewTermFuncs() *TermFuncs

func (*TermFuncs) Black

func (t *TermFuncs) Black(v ...any) string
func (t *TermFuncs) Blink(v ...any) string

func (*TermFuncs) Blue

func (t *TermFuncs) Blue(v ...any) string

func (*TermFuncs) Bold

func (t *TermFuncs) Bold(v ...any) string

func (*TermFuncs) BrightBlack

func (t *TermFuncs) BrightBlack(v ...any) string

func (*TermFuncs) BrightBlue

func (t *TermFuncs) BrightBlue(v ...any) string

func (*TermFuncs) BrightCyan

func (t *TermFuncs) BrightCyan(v ...any) string

func (*TermFuncs) BrightGreen

func (t *TermFuncs) BrightGreen(v ...any) string

func (*TermFuncs) BrightMagenta

func (t *TermFuncs) BrightMagenta(v ...any) string

func (*TermFuncs) BrightRed

func (t *TermFuncs) BrightRed(v ...any) string

func (*TermFuncs) BrightWhite

func (t *TermFuncs) BrightWhite(v ...any) string

func (*TermFuncs) BrightYellow

func (t *TermFuncs) BrightYellow(v ...any) string

func (*TermFuncs) Color

func (t *TermFuncs) Color(color string, v ...any) (string, error)

func (*TermFuncs) Cyan

func (t *TermFuncs) Cyan(v ...any) string

func (*TermFuncs) Dim

func (t *TermFuncs) Dim(v ...any) string

func (*TermFuncs) Green

func (t *TermFuncs) Green(v ...any) string

func (*TermFuncs) Hidden

func (t *TermFuncs) Hidden(v ...any) string

func (*TermFuncs) Italic

func (t *TermFuncs) Italic(v ...any) string

func (*TermFuncs) Magenta

func (t *TermFuncs) Magenta(v ...any) string

func (*TermFuncs) Red

func (t *TermFuncs) Red(v ...any) string

func (*TermFuncs) Reset

func (t *TermFuncs) Reset() string

func (*TermFuncs) ResetColor

func (t *TermFuncs) ResetColor() string

func (*TermFuncs) Reverse

func (t *TermFuncs) Reverse(v ...any) string

func (*TermFuncs) Strike

func (t *TermFuncs) Strike(v ...any) string

func (*TermFuncs) Style

func (t *TermFuncs) Style(styles string, a ...any) (string, error)

func (*TermFuncs) Underline

func (t *TermFuncs) Underline(v ...any) string

func (*TermFuncs) White

func (t *TermFuncs) White(v ...any) string

func (*TermFuncs) Yellow

func (t *TermFuncs) Yellow(v ...any) string

Jump to

Keyboard shortcuts

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