template

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateEngine

type TemplateEngine interface {
	// Render renders the given template using the context variables and helpers.
	Render(ctx context.Context, template string) (string, error)
}
var (
	Engine TemplateEngine = NewTemplateEngine()
)

func NewTemplateEngine

func NewTemplateEngine() TemplateEngine

NewTemplateEngine returns a new template engine.

type TemplatedPath

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

func NewTemplatedPath

func NewTemplatedPath(path string) TemplatedPath

func (TemplatedPath) Render

func (p TemplatedPath) Render(ctx context.Context) (string, error)

type TemplatedString

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

TemplatedString is a string that can be templated.

func NewTemplatedString

func NewTemplatedString(str string) TemplatedString

NewTemplatedString creates a new TemplatedString.

func (TemplatedString) Render

func (s TemplatedString) Render(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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