handlebars

package module
v0.0.0-...-660b00c Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 12 Imported by: 0

README

Build status PkgGoDev

handlebars

handlebars template engine by golang

TODO

  • Local
  • Helper
  • RenderInLayout
  • RegisterPartials

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Above

func Above(ctx interface{}, args ...interface{})

func Below

func Below(ctx interface{}, args ...interface{})

func Each

func Each(ctx interface{}, args ...interface{})

func If

func If(ctx interface{}, args ...interface{})

func RenderFile

func RenderFile(filename string, context ...interface{}) string

func RenderString

func RenderString(data string, context ...interface{}) string

func With

func With(ctx interface{}, args ...interface{})

Types

type Render

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

func New

func New(conf map[string]interface{}) *Render

func (*Render) Parse

func (r *Render) Parse(data string, context ...interface{}) string

public

func (*Render) RegisterPartial

func (r *Render) RegisterPartial(name string, filename string)

func (*Render) RegisterPartials

func (r *Render) RegisterPartials(dir string)

func (*Render) Render

func (r *Render) Render(filename string, context ...interface{}) string

type Template

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

func (*Template) Render

func (tmpl *Template) Render(context ...interface{}) string

Jump to

Keyboard shortcuts

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