template

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTemplateNotFound = response.NewCode(404, "template not found", http.StatusNotFound)
)

Functions

func LoadFromEmbed

func LoadFromEmbed(ctx context.Context, efs embed.FS, dirName ...string) (err error)

Types

type Template

type Template struct {
	Content string
	// contains filtered or unexported fields
}

func Create

func Create(name, content string) (t *Template, err error)

func T

func T(name string) *Template

func (Template) Parse

func (t Template) Parse(params map[string]string) (s string, err error)

type Templates

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

func (*Templates) Get

func (t *Templates) Get(name string) *Template

Jump to

Keyboard shortcuts

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