templatex

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	// contains filtered or unexported fields
}

T is a template helper.

func New

func New() *T

New creates a new template helper.

func (*T) AppendFuncMap

func (t *T) AppendFuncMap(fm template.FuncMap)

func (*T) MustExecute

func (t *T) MustExecute(data interface{}) *T

MustExecute executes the template.

func (*T) MustParse

func (t *T) MustParse(text string) *T

MustParse parses the template.

func (*T) MustSave

func (t *T) MustSave(filename string, format bool)

MustSave saves the template to the given filename, it will do nothing if it exists.

func (*T) MustSaveAs

func (t *T) MustSaveAs(filename string, formatCode bool)

MustSaveAs saves the template to the given filename, it will overwrite the file if it exists.

func (*T) Write

func (t *T) Write(writer io.Writer, formatCode bool)

Jump to

Keyboard shortcuts

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