source

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(tm *template.Template, data interface{}) (string, error)

Types

type ErrorBuilder

type ErrorBuilder interface {
	Wrap(reason string) string
	New(reason string) string
}

func HeaderParseError

func HeaderParseError(param string) ErrorBuilder

func PathParseError

func PathParseError(param string) ErrorBuilder

func QueryParseError

func QueryParseError(param string) ErrorBuilder

type ErrorWrapper

type ErrorWrapper = ErrorBuilder

type Render

type Render = Templater

func Assign

func Assign(to string, from Render) Render

type RenderFunc added in v0.0.10

type RenderFunc = TemplaterFunc

type Renders

type Renders []Render

func (Renders) String

func (c Renders) String() (string, error)

type Template

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

func InitTemplate

func InitTemplate(name, text string) *Template

func (*Template) String

func (t *Template) String(data interface{}) (string, error)

type Templater

type Templater interface {
	String() (string, error)
}

type TemplaterFunc added in v0.0.10

type TemplaterFunc func() (string, error)

func (TemplaterFunc) String added in v0.0.10

func (t TemplaterFunc) String() (string, error)

Jump to

Keyboard shortcuts

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