Help us shape the future of Go! Take the 2026 Go Developer Survey

templatex

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTemplate

func ParseTemplate(data any, tplT []byte, op ...opts.Opt[TemplateOpts]) ([]byte, error)

ParseTemplate template

func ParseTemplateWithName added in v1.0.0

func ParseTemplateWithName(name string, data any, tplT []byte, op ...opts.Opt[TemplateOpts]) ([]byte, error)

ParseTemplate template

func WithFuncMaps

func WithFuncMaps(funcMaps []template.FuncMap) opts.Opt[TemplateOpts]

func WithOptions

func WithOptions(options ...string) opts.Opt[TemplateOpts]

Types

type TemplateOpts

type TemplateOpts struct {
	Options  []string
	FuncMaps []template.FuncMap
}

func (TemplateOpts) DefaultOptions

func (opts TemplateOpts) DefaultOptions() TemplateOpts

Jump to

Keyboard shortcuts

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