templates

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileTpl                = "fileTemplate"
	ConstructorTpl         = "constructorTemplate"
	OptionalTypeTpl        = "optionalTypeTemplate"
	OptionalConstructorTpl = "optionalConstructorTemplate"
	OptionalWithTpl        = "optionalWithTemplate"
	BuilderTypeTpl         = "builderTypeTemplate"
	BuilderConstructorTpl  = "builderConstructorTemplate"
	BuilderMethodTpl       = "builderMethodTemplate"
	BuilderBuildMethodTpl  = "builderBuildMethodTemplate"
	TemporaryTpl           = "temporaryTemplate"
)

Variables

This section is empty.

Functions

func Execute

func Execute(templateName string, data any) ([]byte, error)

func ExecuteTempTemplate

func ExecuteTempTemplate(tpl string, data any) string

func ExecuteTemplate

func ExecuteTemplate(tpl *template.Template, data any) ([]byte, error)

func Must

func Must[T any](t T, e error) T

Types

This section is empty.

Jump to

Keyboard shortcuts

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