tplx

package
v5.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplateFuncMap = template.FuncMap{
	"unescaped":           Unescaped,
	"urlconvert":          Urlconvert,
	"timeformat":          Timeformat,
	"timestamp":           Timestamp,
	"args":                Args,
	"reReplaceAll":        ReReplaceAll,
	"match":               regexp.MatchString,
	"toUpper":             strings.ToUpper,
	"toLower":             strings.ToLower,
	"contains":            strings.Contains,
	"humanize":            Humanize,
	"humanize1024":        Humanize1024,
	"humanizeDuration":    HumanizeDuration,
	"humanizePercentage":  HumanizePercentage,
	"humanizePercentageH": HumanizePercentageH,
}

Functions

func Args added in v5.9.2

func Args(args ...interface{}) map[string]interface{}

func Humanize added in v5.9.2

func Humanize(s string) string

func Humanize1024 added in v5.9.2

func Humanize1024(s string) string

func HumanizeDuration added in v5.9.2

func HumanizeDuration(s string) string

func HumanizePercentage added in v5.9.2

func HumanizePercentage(s string) string

func HumanizePercentageH added in v5.9.2

func HumanizePercentageH(s string) string

func ReReplaceAll added in v5.9.2

func ReReplaceAll(pattern, repl, text string) string

func Timeformat added in v5.9.2

func Timeformat(ts int64, pattern ...string) string

func Timestamp added in v5.9.2

func Timestamp(pattern ...string) string

func Unescaped added in v5.9.2

func Unescaped(str string) interface{}

func Urlconvert added in v5.9.2

func Urlconvert(str string) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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