template

package
v0.0.0-...-7a22eef Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *template.Template

Types

type Component

type Component struct {
}

type Components

type Components struct {
	UUIDs          int
	CIDToComponent map[string]string
	// map[componentName]map[ID]ComponentID
	IDToCID map[string]string
}

type Diff

type Diff struct {
	Static     []string
	Dynamic    []interface{}
	Components []string
}

func (Diff) MarshalJSON

func (d Diff) MarshalJSON() ([]byte, error)

func (Diff) String

func (d Diff) String() string

type Template

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

func Compile

func Compile(stdTpl *template.Template) *Template

func Must

func Must(tpl *Template, err error) *Template

func ParseGlob

func ParseGlob(glob string) (*Template, error)

func (*Template) Execute

func (t *Template) Execute(data interface{}) (Diff, error)

func (*Template) ExecuteTemplate

func (t *Template) ExecuteTemplate(name string, data interface{}) (Diff, error)

func (*Template) Lookup

func (t *Template) Lookup(name string) *Template

Jump to

Keyboard shortcuts

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