04_parse_execute/

directory
v0.0.0-...-42ea4af Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT

README

Type Template

template.Template

template.Template

Parsing templates

template.ParseFiles
func ParseFiles(filenames ...string) (*Template, error)
template.ParseGlob
func ParseGlob(pattern string) (*Template, error)

template.Parse
func (t *Template) Parse(text string) (*Template, error)
template.ParseFiles
func (t *Template) ParseFiles(filenames ...string) (*Template, error)
template.ParseGlob
func (t *Template) ParseGlob(pattern string) (*Template, error)

Executing templates

template.Execute
func (t *Template) Execute(wr io.Writer, data interface{}) err
template.ExecuteTemplate
func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{}) error

Helpful template functions

template.Must
func Must(t *Template, err error) *Template
template.New
func New(name string) *Template

The init function

func init()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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