funcs

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: BSD-3-Clause Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

type Base32Funcs struct{}

func (*Base32Funcs) Decode added in v0.5.0

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

func (*Base32Funcs) Encode added in v0.5.0

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

func (*Base32Funcs) Self added in v0.5.0

func (f *Base32Funcs) Self() any

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)

func (*Base64Funcs) Self added in v0.5.0

func (f *Base64Funcs) Self() any

type Expander

type Expander = expander.Interface

type HexFuncs added in v0.5.0

type HexFuncs struct{}

func (*HexFuncs) Decode added in v0.5.0

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

func (*HexFuncs) Encode added in v0.5.0

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

func (*HexFuncs) Self added in v0.5.0

func (f *HexFuncs) Self() any

type TermFuncs

type TermFuncs struct {
	ColorEnabled bool
}

func NewTermFuncs

func NewTermFuncs() *TermFuncs

func (*TermFuncs) Background added in v0.5.0

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

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) Colorize added in v0.5.0

func (t *TermFuncs) Colorize(str string, colorpattern ...string) (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(v ...any) string

func (*TermFuncs) Reverse

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

func (*TermFuncs) Self added in v0.5.0

func (t *TermFuncs) Self() any

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