blade

package module
v0.0.0-...-f903bf1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 9 Imported by: 0

README

Modello

Documentation

Index

Constants

View Source
const ViewExt = ".blade.html"

Variables

This section is empty.

Functions

This section is empty.

Types

type Blade

type Blade struct {
	Compiler *Compiler
	// contains filtered or unexported fields
}

func New

func New(viewPath, cachePath string) *Blade

func (*Blade) View

func (blade *Blade) View(view string, data interface{}) *View

type Compiler

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

func NewCompiler

func NewCompiler() *Compiler

func (*Compiler) Compile

func (compiler *Compiler) Compile(file string) ([]byte, error)

func (*Compiler) CompiledPath

func (compiler *Compiler) CompiledPath(file string) string

func (*Compiler) IsExpired

func (compiler *Compiler) IsExpired(file string) bool

func (*Compiler) WriteCompiled

func (compiler *Compiler) WriteCompiled(filename string, contents []byte) error

type H

type H map[string]interface{}

H is a shortcut for map[string]interface{}

type Lexer

type Lexer interface {
	Parse(context []byte) []byte
}

type View

type View struct {
	Template *template.Template
	Name     string
	HTML     string
	Data     interface{}
}

func (*View) Prepare

func (view *View) Prepare() error

func (*View) Render

func (view *View) Render(writer io.Writer) error

func (*View) Strings

func (view *View) Strings() string

Directories

Path Synopsis
else lexer use as if else
else lexer use as if else

Jump to

Keyboard shortcuts

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